rcpp_cell_from_xy: rcpp_cell_from_xy

View source: R/RcppExports.R

rcpp_cell_from_xyR Documentation

rcpp_cell_from_xy

Description

Rcpp get cell from xy

Usage

rcpp_cell_from_xy(x, y, extent, dimensions, rcpp)

Arguments

x, y

Numeric with x,y coordinates.

extent

Vector with extent (xmin, xmax, ymin, ymax).

dimensions

Vector with number or rows and cols

rcpp

Logical if TRUE Rcpp index is returned.

Details

Get cell ID from xy coordinates. Allows only one coordinate pair at a time. If rcpp = TRUE indexing starts at 0 in accordance with C++.

Value

int

References

Code adapted from Robert J. Hijmans (2020). raster: Geographic Data Analysis and Modeling. R package version 3.4-5. <https://CRAN.R-project.org/package=raster>


Allgeier-Lab/arrR documentation built on Feb. 13, 2025, 7:44 a.m.