Learn R Programming

⚠️There's a newer version (1.2.3) of this package.Take me there.

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

691

Version

1.1.4

License

MIT + file LICENSE

Maintainer

Luíz Esser

Last Published

August 29th, 2025

Functions in caretSDM (1.1.4)

join_area

Join Area
plot_occurrences

S3 Methods for plot and mapview
is_input_sdm

is_class functions to check caretSDM data classes.
pca_predictors

Predictors as PCA-axes
pdp_sdm

Model Response to Variables
predict_sdm

Predict SDM models in new data
occurrences_sdm

Occurrences Managing
parana

Paraná State
predictors

Predictors Names Managing
print.input_sdm

Print method for input_sdm
scen_rs

Bioclimatic Variables
occ

Araucaria angustifolia occurrence data
print.models

Print method for models
scen

Bioclimatic Variables
vif_predictors

Calculate VIF
train_sdm

Train SDM models
varImp_sdm

Calculation of variable importance for models
print.occurrences

Print method for occurrences
tsne_sdm

tSNE
print.predictions

Print method for predictions
use_esm

Ensemble of Small Models (ESM) in caretSDM
pseudoabsences

Obtain Pseudoabsences
select_predictors

Tidyverse methods for caretSDM objects
rivs

Hydrologic Variables
summary_sdm

Calculates performance across resamples
write_ensembles

Write caretSDM data
salm

Salminus brasiliensis occurrence data
use_mem

MacroEcological Models (MEM) in caretSDM
sdm_area

Create a sdm_area object
sdm_as_stars

sdm_as_X functions to transform caretSDM data into other classes.
GBIF_data

Retrieve Species data from GBIF
algorithms

Caret Algorithms
gcms_ensembles

Ensemble GCMs into one scenario
buffer_sdm

Create buffer around occurrences
WorldClim_data

Download WorldClim v.2.1 bioclimatic data
data_clean

Presence data cleaning routine
add_predictors

Add predictors to sdm_area
add_scenarios

Add scenarios to sdm_area
input_sdm

input_sdm
caretSDM-package

caretSDM: Build Species Distribution Modeling using 'caret'
bioc

Bioclimatic Variables