Learn R Programming

caretSDM

Luíz Fernando Esser

caretSDM

caretSDM is a under development R package that uses the powerful caret package as the main engine to obtain Species Distribution Models. As caret is a packaged turned to build machine learning models, caretSDM has a strong focus on this approach.

Installation

You can install the development version of caretSDM from GitHub with:

install.packages("devtools")
devtools::install_github("luizesser/caretSDM")

The package is also available on CRAN. Users are able to install it using the following code:

install.packages("caretSDM")

You need help?

caretSDM is vastly documented and has included some objects that can guide your data management. If some of your data or code seem to be wrong, try to take a look at those objects or the articles in the website:

Objects

  • bioc Bioclimatic variables for current scenario in stars class.

  • rivs Hydrological variables for current scenario in sf class.

  • occ Araucaria angustifolia occurrence data as a dataframe.

  • salm Salminus brasiliensis occurrence data as a dataframe.

  • parana Shapefile to use in sdm_area in Simple Feature class.

  • scen Bioclimatic variables for future scenarios in stars class.

  • scen_rs Bioclimatic variables for invasive assessments vignette.

  • algorithms Dataframe with characteristics from every algorithm available in caretSDM.

Articles

  • Adding New Algorithms to caretSDM do not found your ideal algorithm already implemented? Here we show how to implement any custom algorithm in our package.

  • caretSDM Workflow for Species Distribution Modeling is the main vignette for terrestrial species modeling, where we model the tree species Araucaria angustifolia.

  • Concatenate functions in caretSDM shows how to build compact scripts, which is very useful to run your first tests.

  • Projecting Non-native Distribution using SDMs a vignette demonstrating how to make invasiveness assessments.

  • Modeling Species Distributions in Continental Water Bodies is the main vignette for continental aquatic species modeling, where we model the fish species Salminus brasiliensis.

  • Modeling Rare Species using Ensemble of Small Models we showcase how easy it is to apply SDMs to rare species with low number of records.

Copy Link

Version

Install

install.packages('caretSDM')

Monthly Downloads

460

Version

1.2.3

License

MIT + file LICENSE

Maintainer

Luíz Esser

Last Published

November 6th, 2025

Functions in caretSDM (1.2.3)

occurrences_sdm

Occurrences Managing
input_sdm

input_sdm
plot_occurrences

S3 Methods for plot and mapview
gcms_ensembles

Ensemble GCMs into one scenario
pca_predictors

Predictors as PCA-axes
parana

Paraná State
join_area

Join Area
is_input_sdm

is_class functions to check caretSDM data classes.
pdp_sdm

Model Response to Variables
occ

Araucaria angustifolia occurrence data
print.occurrences

Print method for occurrences
predictors

Predictors Names Managing
pseudoabsences

Obtain Pseudoabsences
prediction_change_sdm

Prediction Change Analysis
print.predictions

Print method for predictions
print.models

Print method for models
print.input_sdm

Print method for input_sdm
predict_sdm

Predict SDM models in new data
salm

Salminus brasiliensis occurrence data
rivs

Hydrologic Variables
use_esm

Ensemble of Small Models (ESM) in caretSDM
scen_rs

Bioclimatic Variables
sdm_area

Create a sdm_area object
sdm_as_stars

sdm_as_X functions to transform caretSDM data into other classes.
tuneGrid_sdm

Retrieve tuneGrid from models
scen

Bioclimatic Variables
select_predictors

Tidyverse methods for caretSDM objects
train_sdm

Train SDM models
summary_sdm

Calculates performance across resamples
write_ensembles

Write caretSDM data
vif_predictors

Calculate VIF
tsne_sdm

tSNE
varImp_sdm

Calculation of variable importance for models
use_mem

MacroEcological Models (MEM) in caretSDM
buffer_sdm

Create buffer around occurrences
caretSDM-package

caretSDM: Build Species Distribution Modeling using 'caret'
correlate_sdm

Correlation between projections
data_clean

Presence data cleaning routine
GBIF_data

Retrieve Species data from GBIF
WorldClim_data

Download WorldClim v.2.1 bioclimatic data
algorithms

Caret Algorithms
add_scenarios

Add scenarios to sdm_area
add_predictors

Add predictors to sdm_area
bioc

Bioclimatic Variables