comparison (1) is possible only for atomic and list types
Nikki, I'm not sure whether I understood what you are trying to do, but if you just want to replace values in a column of a SpatialGridDataFrame, sp comes with all the methods you need. Example: library(sp) data(meuse.grid) coordinates(meuse.grid) <- ~x+y meuse.grid <- as(as(meuse.grid, "SpatialPixelsDataFrame"),"SpatialGridDataFrame") spplot(meuse.grid[,,"soil"]) meuse.grid$soil[meuse.grid$soil==1] <- 4 meuse.grid$soil[meuse.grid$soil==2 | meuse.grid$soil==3] <- 5 spplot(meuse.grid[,,"soil"]) Hope that helps, Tom
Technische Universit?t M?nchen Department f?r Pflanzenwissenschaften Lehrstuhl f?r Gr?nlandlehre Alte Akademie 12 85350 Freising / Germany Phone: ++49 (0)8161 715324 Fax: ++49 (0)8161 713243 email: tom.gottfried at wzw.tum.de http://www.wzw.tum.de/gruenland