You have a typo.

It is SpatialPixelsDataFrame. note the s

Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina

nikhil.l...@gmail.com

On Aug 25, 2010, at 4:43 AM, Dorothea Lemke wrote:

Dear list,

I have problems to coerce a SpatialGridDataFrame object to a
SpatialPixelDataFrame. I 've calculated a kerneldensity (splancs) and I want
to convert the results from the SpatialGridDataFrame to a
SpatialPixelDataFrame.

My R-code:

library (maptools)
library (splancs)
library (rgdal)

kcasesC67m<-spkernel2d(cases, pRBMS, h0=3500, gt)
kcontrolsC67m<-spkernel2d(controls, pRBMS, h0=3500, gt)
df<-data.frame(kcasesC67m=kcasesC67m, kcontrolsC67m=kcontrolsC67m)
spkratio<-SpatialGridDataFrame(gt, data = df)
spkratioP<-as(spkratio, "SpatialPixelDataFrame")

But I get the error message: "No methods and no standards to convert
SpatialGridDataFrame in SpatialPixelDataFrame".

Many thanks for your help
Dorothea

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to