View source: R/calculate_covariates.R
| calculate_huc | R Documentation |
Extract HUC IDs at point locations. Returns a data.frame
object containing locs_id and HUC IDs.
calculate_huc(from, locs, locs_id = "site_id", geom = FALSE, ...)
from |
SpatVector(1). Output from |
locs |
data.frame. character to file path, SpatVector, or sf object. |
locs_id |
character(1). Column within |
geom |
FALSE/"sf"/"terra".. Should the function return with geometry?
Default is |
... |
Placeholders. |
a data.frame or SpatVector object
Insang Song
process_huc()
## NOTE: Example is wrapped in `\dontrun{}` as function requires a large
## amount of data which is not included in the package.
## Not run:
loc <- data.frame(id = "001", lon = -78.90, lat = 35.97)
calculate_huc(
from = huc, # derived from process_huc() example
locs = loc,
locs_id = "id",
geom = FALSE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.