Learn R Programming

biomod2 (version 4.1-2)

BIOMOD.models.out: BIOMOD_Modeling() output object class

Description

Class returned by BIOMOD_Modeling, and used by BIOMOD_LoadModels, BIOMOD_PresenceOnly, BIOMOD_Projection and BIOMOD_EnsembleModeling

Usage

# S4 method for BIOMOD.models.out
show(object)

Arguments

object

a BIOMOD.models.out object

Slots

modeling.id

a character corresponding to the name (ID) of the simulation set

dir.name

a character corresponding to the modeling folder

sp.name

a character corresponding to the species name

expl.var.names

a vector containing names of explanatory variables

models.computed

a vector containing names of computed models

models.failed

a vector containing names of failed models

has.evaluation.data

a logical value defining whether evaluation data is given

scale.models

a logical value defining whether models have been rescaled or not

formated.input.data

a BIOMOD.stored.formated.data-class object containing informations from BIOMOD_FormatingData object

calib.lines

a BIOMOD.stored.array-class object containing calibration lines

models.options

a BIOMOD.stored.models.options-class object containing informations from BIOMOD_ModelingOptions object

models.evaluation

a BIOMOD.stored.array-class object containing models evaluation

variables.importance

a BIOMOD.stored.array-class object containing variables importance

models.prediction

a BIOMOD.stored.array-class object containing models predictions

models.prediction.eval

a BIOMOD.stored.array-class object containing models predictions for evaluation data

link

a character containing the file name of the saved object

Author

Damien Georges

See Also

BIOMOD_Modeling, BIOMOD_LoadModels, BIOMOD_PresenceOnly, BIOMOD_Projection, BIOMOD_EnsembleModeling, bm_VariablesImportance, bm_PlotEvalMean, bm_PlotEvalBoxplot, bm_PlotVarImpBoxplot, bm_PlotResponseCurves

Other Toolbox objects: BIOMOD.ensemble.models.out, BIOMOD.formated.data.PA, BIOMOD.formated.data, BIOMOD.models.options, BIOMOD.projection.out, BIOMOD.stored.data, biomod2_ensemble_model, biomod2_model

Examples

Run this code

showClass("BIOMOD.models.out")

## ----------------------------------------------------------------------- #

# Load species occurrences (6 species available)
myFile <- system.file('external/species/mammals_table.csv', package = 'biomod2')
DataSpecies <- read.csv(myFile, row.names = 1)
head(DataSpecies)

# Select the name of the studied species
myRespName <- 'GuloGulo'

# Get corresponding presence/absence data
myResp <- as.numeric(DataSpecies[, myRespName])

# Get corresponding XY coordinates
myRespXY <- DataSpecies[, c('X_WGS84', 'Y_WGS84')]

# Load environmental variables extracted from BIOCLIM (bio_3, bio_4, bio_7, bio_11 & bio_12)
myFiles <- paste0('external/bioclim/current/bio', c(3, 4, 7, 11, 12), '.grd')
myExpl <- raster::stack(system.file(myFiles, package = 'biomod2'))

# \dontshow{
myExtent <- raster::extent(0,30,45,70)
myExpl <- raster::stack(raster::crop(myExpl, myExtent))
# }

## ----------------------------------------------------------------------- #
# Format Data with true absences
myBiomodData <- BIOMOD_FormatingData(resp.var = myResp,
                                     expl.var = myExpl,
                                     resp.xy = myRespXY,
                                     resp.name = myRespName)

# Create default modeling options
myBiomodOptions <- BIOMOD_ModelingOptions()


## ----------------------------------------------------------------------- #
# Model single models
myBiomodModelOut <- BIOMOD_Modeling(bm.format = myBiomodData,
                                    modeling.id = 'AllModels',
                                    models = c('RF', 'GLM'),
                                    bm.options = myBiomodOptions,
                                    nb.rep = 2,
                                    data.split.perc = 80,
                                    metric.eval = c('TSS','ROC'),
                                    var.import = 3,
                                    do.full.models = FALSE,
                                    seed.val = 42)
myBiomodModelOut


Run the code above in your browser using DataLab