- data_dir
(character) Required directory path where the faunabr
data is saved.
- occ
(data.frame or data.table) a data frame containing the occurrence
records to be flagged. Must contain columns for species, longitude, and
latitude.
- species
(character) the name of the column in occ that contains the
species scientific names. Default is "species".
- long
(character) the name of the column in occ that contains the
longitude values. Default is "decimalLongitude".
- lat
(character) the name of the column in occ that contains the
latitude values. Default is "decimalLatitude".
- origin
(character) filter the faunabr data by origin type
before checking ("native", "cryptogenic", or "exotic"). Default is
NULL (no filtering).
- by_state
(logical) if TRUE, flags records based on their distance
to known Brazilian state distributions. Default is TRUE.
- buffer_state
(numeric) buffer distance (in kilometers) to be applied
around the known state distribution boundaries. Records within this distance
are considered valid. Default is 20 km.
- by_country
(logical) if TRUE, flags records based on their distance
to country distributions. Default is TRUE.
- buffer_country
(numeric) buffer distance (in kilometers) to be applied
around the country boundaries. Records within this distance are considered
valid. Default is 20 km.
- keep_columns
(logical) if TRUE, the returned data frame contains
all original columns from occ. If FALSE, it returns only the key columns
and the flag. Default is TRUE.
- spat_state
(SpatVector) a SpatVector of the Brazilian states. By
default, it uses the SpatVector provided by geobr::read_state(). It can be
another Spatvector, but the structure must be identical to 'faunabr::states',
with a column called "abbrev_state" identifying the states codes.
- spat_country
(SpatVector) a SpatVector of the world countries. By
default, it uses the SpatVector provided by rnaturalearth::ne_countries. It
can be another Spatvector, but the structure must be identical to
'faunabr::world_fauna', with a column called "country_code" identifying the
country codes.
- progress_bar
(logical) whether to display a progress bar during
processing. If TRUE, the 'pbapply' package must be installed. Default is
FALSE.
- verbose
(logical) if TRUE, prints messages about the progress and
the number of species being checked. Default is FALSE.