[R-sig-Geo] melt spatialPixelDataFrame

Johannes Radinger JRadinger at gmx.at
Wed Jul 18 15:16:51 CEST 2012


Hi,

maybe someone know a simple solution:

I want to melt (melt from reshape2) a SpatialPixelDataFrame with the two ids (x and y). 

I tried: 
1) to transform the SPDF to a normal dataframe with as.data.frame(spdf) but then I loose my x and y columns. Thus I can't use them in melt. Was that behavior changed recently?
2) to melt the spdf itself wasn't working either....

Probably I need a normal dataframe + the x and y column from the SPDF.

/Johannes



More information about the R-sig-Geo mailing list