use_esm: Ensemble of Small Models (ESM) in caretSDM

View source: R/use_esm.R

use_esmR Documentation

Ensemble of Small Models (ESM) in caretSDM

Description

This functions set parameters to run a ESM when running train_sdm.

Usage

use_esm(x, spp = NULL, n_records = 20)

Arguments

x

A occurrences or input_sdm object containing occurrences.

spp

A vector of species names containing the species which the ESM must be applied. Standard is NULL.

n_records

Numeric. Number of species records to apply the ESM. Standard is 20.

Details

We supply two different ways to apply the ESM. If species names are provided, then ESM will be applied only in given species. If a number of species records is provided, then ESM will be applied in every species with number of records bellow the given threshold. As standard, use_esm will be apply to every species with less then 20 records.

Value

A input_sdm or occurrences object with ESM parameters.

Author(s)

Luíz Fernando Esser (luizesser@gmail.com) https://luizfesser.wordpress.com

Examples

# Create sdm_area object:
sa <- sdm_area(parana, cell_size = 100000, crs = 6933)

# Include predictors:
sa <- add_predictors(sa, bioc) |> select_predictors(c("bio1", "bio4", "bio12"))

# Include scenarios:
sa <- add_scenarios(sa)

# Create occurrences:
oc <- occurrences_sdm(occ, crs = 6933) |> join_area(sa)

# Create input_sdm:
i <- input_sdm(oc, sa)

# Use MEM:
i <- use_esm(i, n_records = 999)


caretSDM documentation built on March 10, 2026, 5:08 p.m.