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 = "feature_extraction",
impute_features = TRUE
)
a data.frame of species occurrence records including three columns with species name, longitudinal coordinates and latitudinal coordinates (both decimal).
a character string. The name of the column with the species names.
a character string. The name of the column with the longitude.
a character string. The name of the column with the latitude.
character. The type of features to calculate. Possible options are “geographic”, “biome”, “climate”, “human footprint”.
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
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.
a data.frame of features
Without internet access, only geographic features are calculated,
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()
if (FALSE) {
dat <- data.frame(species = c("A","B"),
decimallongitude = runif (200,10,15),
decimallatitude = runif (200,-5,5))
iucnn_prepare_features(dat)
}