| BIOMOD.projection.out {biomod2} | R Documentation |
BIOMOD_Projection() output object class
Description
Class returned by BIOMOD_Projection, and used by
BIOMOD_EnsembleForecasting
Usage
## S4 method for signature 'BIOMOD.projection.out,missing'
plot(
x,
coord = NULL,
plot.output,
do.plot = TRUE,
std = TRUE,
scales,
size,
maxcell = 5e+05,
...
)
## S4 method for signature 'BIOMOD.projection.out'
show(object)
Arguments
x |
a |
coord |
a 2-columns |
plot.output |
(optional, default |
do.plot |
(optional, default |
std |
(optional, default |
scales |
(optional, default |
size |
(optional, default |
maxcell |
maximum number of cells to plot. Argument transmitted to |
... |
additional parameters to be passed to |
object |
a |
Slots
modeling.ida
charactercorresponding to the name (ID) of the simulation setproj.namea
charactercorresponding to the projection namedir.namea
charactercorresponding to the modeling foldersp.namea
charactercorresponding to the species nameexpl.var.namesa
vectorcontaining names of explanatory variablescoorda 2-columns
matrixordata.framecontaining the correspondingXandYcoordinates used to project the species distribution model(s)scale.modelsa
logicalvalue defining whether models have been rescaled or notmodels.projecteda
vectorcontaining names of projected modelsmodels.outa
BIOMOD.stored.dataobjecttypea
charactercorresponding to the class of thevalslot of theproj.outslotproj.outa
BIOMOD.stored.dataobject
Author(s)
Damien Georges
See Also
BIOMOD_Projection, BIOMOD_EnsembleForecasting
Other Toolbox objects:
BIOMOD.ensemble.models.out,
BIOMOD.formated.data,
BIOMOD.formated.data.PA,
BIOMOD.models.options,
BIOMOD.models.out,
BIOMOD.options.dataset,
BIOMOD.options.default,
BIOMOD.stored.data,
biomod2_ensemble_model,
biomod2_model
Examples
showClass("BIOMOD.projection.out")
## ----------------------------------------------------------------------- #
library(terra)
# Load species occurrences (6 species available)
data(DataSpecies)
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)
data(bioclim_current)
myExpl <- terra::rast(bioclim_current)
## ----------------------------------------------------------------------- #
file.out <- paste0(myRespName, "/", myRespName, ".AllModels.models.out")
if (file.exists(file.out)) {
myBiomodModelOut <- get(load(file.out))
} else {
# Format Data with true absences
myBiomodData <- BIOMOD_FormatingData(resp.var = myResp,
expl.var = myExpl,
resp.xy = myRespXY,
resp.name = myRespName)
# Model single models
myBiomodModelOut <- BIOMOD_Modeling(bm.format = myBiomodData,
modeling.id = 'AllModels',
models = c('RF', 'GLM'),
CV.strategy = 'random',
CV.nb.rep = 2,
CV.perc = 0.8,
OPT.strategy = 'bigboss',
metric.eval = c('TSS','ROC'),
var.import = 3,
seed.val = 42)
}
## ----------------------------------------------------------------------- #
# Project single models
myBiomodProj <- BIOMOD_Projection(bm.mod = myBiomodModelOut,
proj.name = 'Current',
new.env = myExpl,
models.chosen = 'all',
metric.binary = 'all',
metric.filter = 'all',
build.clamping.mask = TRUE)
myBiomodProj
plot(myBiomodProj)