I am new to Raster and posting in stackoverflow. When I attempt to plot
stacked rasters or use the predict function I get an error: failure during
raster IO. I have googled the error message but have not found any useful
suggestions as to what could be causing the error. All of my packages are
up-to-date, the layer names and the model names are the same, so that
should not be causing a problem. Perhaps there is something wrong with the
raster files? My raster is composed of 150x150 cells with an associated
attribute table that contains x/y and values for one attribute (eg., em or
p1). I am very new to working with rasters so please excuse my naivete. Any
thoughts or suggestions are greatly appreciated!!

Here's my model

m2<-glm(occu~p1+em, data=clra, family="binomial")

and my rasters

p1<-raster("P1.txt", RAT=TRUE) #read rasters
em<-raster("EM.txt", RAT=TRUE)
ext<-extent(-1892138, -1378238, 1115643, 1653543) #set extents equal
p1<-setExtent(p1,ext, keepres=TRUE, snap=TRUE)
em<-setExtent(em,ext, keepres=TRUE, snap=TRUE)
attributes<-stack(p1,em)

plot(attributes)
Error:failure during raster IO
predict<-stack(p1,em)
Error:failure during raster IO

Thanks

	[[alternative HTML version deleted]]

