Debian Codegraph @

tests/spplot.R

raw
1 options("rgdal_show_exportToProj4_warnings"="none")
2 library(sp)
3 xy = expand.grid(x = 1:4, y = 1:4)
4 xy.sp = SpatialPoints(xy)
5 gridded(xy.sp) = T
6 # deselect 1 row and 2 col:
7 tst = xy.sp[-c(2,6,10,14,9,11,12)]
8 tst
9 # convert to SpatialPixelsDataFrame:
10 tst = SpatialPixelsDataFrame(tst, data.frame(xx = rnorm(9)))
11 spplot(tst["xx"], main = "empty row + col")