data_clean {caretSDM} | R Documentation |
Presence data cleaning routine
Description
Data cleaning wrapper using CoordinateCleaner package.
Usage
data_clean(occ, pred = NULL,
species = NA, lon = NA, lat = NA,
capitals = TRUE,
centroids = TRUE,
duplicated = TRUE,
identical = TRUE,
institutions = TRUE,
invalid = TRUE,
terrestrial = TRUE,
independent_test = TRUE)
Arguments
occ |
A |
pred |
A |
species |
A |
lon |
A |
lat |
A |
capitals |
Boolean to turn on/off the exclusion from countries capitals coordinates (see |
centroids |
Boolean to turn on/off the exclusion from countries centroids coordinates (see |
duplicated |
Boolean to turn on/off the exclusion from duplicated records (see |
identical |
Boolean to turn on/off the exclusion from records with identical lat/long values (see |
institutions |
Boolean to turn on/off the exclusion from biodiversity institutions coordinates (see |
invalid |
Boolean to turn on/off the exclusion from invalid coordinates (see |
terrestrial |
Boolean to turn on/off the exclusion from coordinates falling on sea (see |
independent_test |
Boolean. If |
Details
If the user does not used GBIF_data
function to obtain species records, the function may
have problems to find which column from the presences table has species, longitude and latitude
information. In this regard, we implemented the parameters species
, lon
and
lat
so the use can explicitly inform which columns should be used. If they remain as NA
(standard) the function will try to guess which columns are the correct one.
Value
A occurrences_sdm
object or input_sdm
with cleaned presence data.
Author(s)
Luíz Fernando Esser (luizesser@gmail.com) https://luizfesser.wordpress.com
See Also
GBIF_data occurrences_sdm sdm_area input_sdm
predictors
Examples
# Create sdm_area object:
sa <- sdm_area(parana, cell_size = 50000, crs = 6933)
# Include predictors:
sa <- add_predictors(sa, bioc) |> select_predictors(c("bio1", "bio12"))
# Create occurrences:
oc <- occurrences_sdm(occ, crs = 6933) |> join_area(sa)
# Create input_sdm:
i <- input_sdm(oc, sa)
# Clean coordinates (terrestrial is set to false to make the run quicker):
i <- data_clean(i, terrestrial = FALSE)