point_in_cell: Do points (occurrences) fall within raster cells?

Description Usage Arguments Value

View source: R/point_in_cell.R

Description

This function examines which points fall within a raster cell with data (not NA). Returns TRUE for points falling in a raster cell with data, and FALSE otherwise.

Usage

1
point_in_cell(locs, ras, layer = 1)

Arguments

locs

A matrix, dataframe, SpatialPoints or SpatialPointsDataFrame containing coordinates of species occurrences. If locs is a matrix or dataframe, it will be converted to a spatial object using locs2sp.

ras

Raster* object

layer

Integer. For RasterStack and RasterBrick objects, which layer to use to compare with point locations (default = 1).

Value

A logical vector.


Pakillo/rSDM documentation built on Oct. 15, 2020, 3:20 a.m.