Apply an envelope model for a set of predictors for one taxon
Source:R/envelope_fillter_taxon.R
envelope_filter_taxon.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_taxon(
taxon,
predictors,
vars = elements::VariableNames,
limit = "min_max"
)
Arguments
- taxon
The taxon_code, see
elements::TaxonomicBackbone
.- 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 a taxon before applying the more
computationally expensive SVM models in elements::predict_occ
function
and to a lesser extent the euclidean distance elements::calc_distance
function.
Examples
if (FALSE) {
elements::envelope_filter(taxon = "stellaria_graminea", predictors = elements::ExampleData1)
}