Learn R Programming

BIRDS (version 0.2.0)

getGridIDs: Create unique IDs based on a grid

Description

Takes a spatial points data.frame and a grid and gets the overlay IDs.

Usage

getGridIDs(x, grid, idcol = "id")

Arguments

x

a SpatialPointsDataFrame ('sp') or sf ('sf') (with the observations).

grid

a SpatialPolygon object ('sp') or sf ('sf') (a grid is expected) defining the maximum extent of visits effort.

idcol

column name for the grid names or ids

Value

A vector of the same length as the number of rows (observations) as x with a unique number corresponding to the grid's ID.