Extract values from a Raster* object for point locations. This function adds a few options that can be useful in the context of species distribution modeling to extract
function in the raster package.
pointValues(x, p, a, uniquecells = TRUE, na.rm = TRUE)
matrix
A Raster* object
Points. Two-colum matrix or data.frame; or a SpatialPoints* object
Additional points (absences). Two-colum matrix or data.frame; or a SpatialPoints* object
Logical. If TRUE
, each cell can be included only once (i.e. 'duplicate' points are removed)
Logical. If TRUE
, cell values of NA are not returned
Robert J. Hijmans