[R-sig-Geo] SpatialGridDataFrame to SpatialPixelDataFrame

2010-08-25 Thread Dorothea Lemke
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)

Re: [R-sig-Geo] SpatialGridDataFrame to SpatialPixelDataFrame

2010-08-25 Thread Roman Luštrik
Your df variable should have coordinates in it and in the form of a matrix or SpatialPoints (from ?SpatialGridDataFrame: points coordinates, either as numeric matrix or as object of class SpatialPoints-class). Based on the code you provided, I would guess that you have a few columns to spare, and

Re: [R-sig-Geo] SpatialGridDataFrame to SpatialPixelDataFrame

2010-08-25 Thread Nikhil Kaza
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