[R] projection problem in sp package

uday uday_143_4u at hotmail.com
Fri Mar 2 19:13:17 CET 2012


I am plotting some data using sp package
library (sp)
library(maps) 
data.aggm # data 
# Define standard projection
ll           <- CRS("+proj=longlat +datum=WGS84")
# convert to a SpatialPointsDataFrame
xy           <- cbind(data.aggm[,1], data.aggm[,2])
ch4.spPoints <- SpatialPointsDataFrame(coords=xy,
data=data.frame(data.aggm[,3]), proj4string=ll)

after running this I am getting error is 

Error in validityMethod ( as (object,superClass)):
Geographical CRS given to non -comformant data


does any body know how to fix this error ?

Cheers 

--
View this message in context: http://r.789695.n4.nabble.com/projection-problem-in-sp-package-tp4439317p4439317.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list