SPGDF2matrix {RgoogleMaps} | R Documentation |
This is a modification/ripoff from as.image.SpatialGridDataFrame() in package sp. It merely serves to convert an object of type SpatialGridDataFrame to a matrix
SPGDF2matrix(x, xcol = 1, ycol = 2, col = heat.colors(12), red = 1, green = 2, blue = 3, axes = FALSE, xlim = NULL, ylim = NULL, add = FALSE, PLOT = FALSE, ..., asp = NA, setParUsrBB = FALSE)
x |
object of class SpatialGridDataFrame |
xcol |
column number of x-coordinate, in the coordinate matrix |
ycol |
column number of y-coordinate, in the coordinate matrix |
col |
a vector of colors |
red,green,blue |
columns names or numbers given instead of the attr argument when the data represent an image encoded in three colour bands on the 0-255 integer scale; all three columns must be given in this case, and the attribute values will be constructed using function rgb |
axes |
logical; should coordinate axes be drawn? |
xlim |
x-axis limits |
ylim |
y-axis limits |
add |
logical; if FALSE, the image is added to the plot layout setup
by plot(as(x, "Spatial"),axes=axes,xlim=xlim,ylim=ylim,asp=asp)
which sets up axes and plotting region; if TRUE, the image is added
to the existing plot. |
PLOT |
plot, yes/no? |
... |
arguments passed to image, see examples |
asp |
aspect ratio to be used for plot |
setParUsrBB |
default FALSE, see Spatial-class for further details |
Markus Loecher, Sense Networks <markus@sensenetworks.com>