check_na_data: Check NAs in species data

Description Usage Arguments Value

View source: R/check_na_data.R

Description

Check for NAs in species data by extracting data from environmental raster layers. If argument remove is TRUE the function can automatically remove NAs from the species dataset.

Usage

1
2
3
4
5
6
7
check_na_data(
  species,
  species_column_name = "spec",
  species_gpkg = "data/species.gpkg",
  env_layers,
  remove = FALSE
)

Arguments

species

short species name (character) used in project. For example: satmon for Satureja montana, aursax for Aurinia saxatilis etc

species_column_name

column name (character) as in .gpkg file from where species data will be extracted. Default value is "spec"

species_gpkg

path to Geopackage file where the data on species presences and absences are stored

env_layers

environmental layers (raster stack) that is the result of running create_env_stack function

remove

optional value (boolean) to choose if removal of NAs will also be performed

Value

Data table object


grgurev/sdmflowR documentation built on Feb. 26, 2021, 10:57 a.m.