Convert a data.frame (or data.table) of occurrence records into a SpatVector object.
Usage
spatialize(
occ,
long = "decimalLongitude",
lat = "decimalLatitude",
crs = "epsg:4326",
force_numeric = TRUE
)Arguments
- occ
(data.frame or data.table) a data frame containing the occurrence records to be flagged. Must contain columns for longitude, and latitude.
- long
(character) the name of the column in
occthat contains the longitude values. Default is"decimalLongitude".- lat
(character) the name of the column in
occthat contains the latitude values. Default is"decimalLatitude".- crs
(character) the coordinate reference system (see
?terra::crs). Default is "epsg:4326".- force_numeric
(logical) whether to coerce the longitude and latitude columns to numeric if they are not already. Default is
TRUE.

