| join | R Documentation |
join finds the value of a mapped variable at some specified
locations.
join(xy, x)
x |
an object of class |
xy |
an object of class |
If only one variable is mapped in x, a vector with length
equals to the number of points in xy.
If only several variables are mapped in x, a data.frame
with a number of columns equal to the number of variables in the
object of class SpatialPixelsDataFrame, and with each row
corresponding to the rows of xy.
Clement Calenge clement.calenge@ofb.gouv.fr
SpatialPixelsDataFrame-class for additionnal
information on objects of class SpatialPixelsDataFrame.
SpatialPoints-class for additionnal information on
objects of class SpatialPoints.
data(lynxjura)
## show the data
image(lynxjura$map)
points(lynxjura$locs)
## join the data to the maps:
res <- join(lynxjura$locs, lynxjura$map)
head(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.