[R-sig-Geo] SpatialGridDataFrame to SpatialPixelDataFrame
Nikhil Kaza
nikhil.list at gmail.com
Wed Aug 25 12:05:40 CEST 2010
You have a typo.
It is SpatialPixelsDataFrame. note the s
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.list at 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 at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
More information about the R-sig-Geo
mailing list