join: Finds the Value of Mapped Variables at some Specified...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/join.r

Description

join finds the value of a mapped variable at some specified locations.

Usage

1
 join(xy, x) 

Arguments

x

an object of class SpatialPixelsDataFrame

xy

an object of class SpatialPointsDataFrame

Value

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.

Author(s)

Clement Calenge clement.calenge@ofb.gouv.fr

See Also

SpatialPixelsDataFrame-class for additionnal information on objects of class SpatialPixelsDataFrame. SpatialPoints-class for additionnal information on objects of class SpatialPoints.

Examples

1
2
3
4
5
6
7
8
9
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)

adehabitatMA documentation built on Jan. 14, 2020, 1:07 a.m.