Skip to content
Prev 15652 / 29559 Next

melt spatialPixelDataFrame

Hi,
I am not 100% sure but my output looks different from yours (I am missing x.1 and y.1, the original coords from the SPDF and not the re-attached ones)
Here the output with the same example and sessionInfo():
Loading required package: sp
raster 2.0-08 (27-June-2012)
x      y part.a part.b      dist soil ffreq
1 181180 333740      1      0 0.0000000    1     1
2 181140 333700      1      0 0.0000000    1     1
3 181180 333700      1      0 0.0122243    1     1
4 181220 333700      1      0 0.0434678    1     1
5 181100 333660      1      0 0.0000000    1     1
6 181140 333660      1      0 0.0122243    1     1
R version 2.14.1 (2011-12-22)
Platform: i686-pc-linux-gnu (32-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=C                 LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

other attached packages:
[1] raster_2.0-08 sp_0.9-99    

loaded via a namespace (and not attached):
[1] grid_2.14.1    lattice_0.20-0 tools_2.14.1 




Any idea?

/johannes