Apply an envelope model for a set of predictors for multiple taxa
Source:R/envelope_filter.R
envelope_filter.Rd
Append a column to set of predictors which indicates whether the predictors in each row are within a set of distributional limits for a particular taxon and set of variables.
Usage
envelope_filter(
taxa,
predictors,
vars = elements::VariableNames,
limit = "min_max"
)
Arguments
- taxa
A vector of strings containing one or more taxon codes. See
elements::TaxonomicBackbone
. Optional- predictors
A data frame of predictors. Must include one or more of the following columns: L, M, N, R, S, SD, GP, bio05, bio06, bio16, and bio17
- vars
A vector of strings, containing one or more variables as present in
elements::VariableNames
, which must also be present in the predictors data frame.- limit
A string representing the niche width quantiles, one of "min_max", "q01_q99", "q05_q95", "q10_q90", "q25_q75".
Value
The predictors data frame containing an additional column 'within_limit' indicating whether each row of predictord is wthin the specified limits.
Details
This function acts as an envelope, allowing the screening of large quantities
of predictor data for the suitability of multiple taxa before applying the more
computationally expensive SVM models in elements::predict_occ
and elements::predict_occ_taxon
.
Examples
if (FALSE) {
elements::envelope_filter_taxon(taxa = NULL, predictors = elements::ExampleData2)
}