Error in creating a raster stack - any suggestions on how to fix the problem?


I am trying to create a raster stack of several ASCII files for an environmental variable. This is what I have done so far:

>files <- list.files(path=paste(system.file(package="dismo"), '/temperature', sep=''), pattern='asc', full.names=TRUE )
#gives me a list of the files present in the folder
>predictors <- stack(files)
Error in .local(.Object, ...) : Couldn't determine X spacing

Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", :
Cannot create a RasterLayer object from this file.

I have tried searching the web for help, tried changing files... no luck.

Can anyone help in this matter?