View source: R/iucnn_prepare_features.R
iucnn_prepare_features | R Documentation |
A wrapper function to prepare all default features included in IUCNN:
geographic, biomes, climate, human footprint.
If desired, bias features need to be calculated separately with ft_bias.
For more control over feature preparation, you can use the
iucnn_geography_features
, iucnn_biome_features
, iucnn_climate_features
,
iucnn_footprint_features
functions.
iucnn_prepare_features(
x,
species = "species",
lon = "decimallongitude",
lat = "decimallatitude",
type = c("geographic", "biomes", "climate", "humanfootprint"),
download_folder = tempdir(),
impute_features = TRUE
)
x |
a data.frame of species occurrence records including three columns with species name, longitudinal coordinates and latitudinal coordinates (both decimal). |
species |
a character string. The name of the column with the species names. |
lon |
a character string. The name of the column with the longitude. |
lat |
a character string. The name of the column with the latitude. |
type |
character. The type of features to calculate. Possible options are “geographic”, “biome”, “climate”, “human footprint”. |
download_folder |
character string. The folder were to save the data used for feature extraction. Relative to the working directory. Set to NULL for the working directory |
impute_features |
logical. Should NA values be imputed for features? If TRUE NA values are filled using multiple imputation using missForest. If set to FALSE species with missing values are removed during the training process. |
Without internet access, only geographic features are calculated,
a data.frame of features
Other Feature preparation:
iucnn_bias_features()
,
iucnn_biome_features()
,
iucnn_climate_features()
,
iucnn_cnn_features()
,
iucnn_footprint_features()
,
iucnn_geography_features()
,
iucnn_phylogenetic_features()
,
iucnn_prepare_phy()
## Not run:
dat <- data.frame(species = c("A","B"),
decimallongitude = runif (200,10,15),
decimallatitude = runif (200,-5,5))
iucnn_prepare_features(dat)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.