| BIOMOD.formated.data.PA {biomod2} | R Documentation |
BIOMOD_FormatingData() output object class (with pseudo-absences)
Description
Class returned by BIOMOD_FormatingData, and used by
bm_Tuning, bm_CrossValidation and
BIOMOD_Modeling
Usage
## S4 method for signature 'numeric,data.frame'
BIOMOD.formated.data.PA(
sp,
env,
xy = NULL,
dir.name = ".",
sp.name = NULL,
eval.sp = NULL,
eval.env = NULL,
eval.xy = NULL,
PA.nb.rep = 1,
PA.strategy = "random",
PA.nb.absences = NULL,
PA.dist.min = 0,
PA.dist.max = NULL,
PA.sre.quant = 0.025,
PA.user.table = NULL,
na.rm = TRUE,
filter.raster = FALSE
)
## S4 method for signature 'numeric,SpatRaster'
BIOMOD.formated.data.PA(
sp,
env,
xy = NULL,
dir.name = ".",
sp.name = NULL,
eval.sp = NULL,
eval.env = NULL,
eval.xy = NULL,
PA.nb.rep = 1,
PA.strategy = "random",
PA.nb.absences = NULL,
PA.dist.min = 0,
PA.dist.max = NULL,
PA.sre.quant = 0.025,
PA.user.table = NULL,
na.rm = TRUE,
filter.raster = FALSE
)
Arguments
sp |
A |
env |
a |
xy |
(optional, default |
dir.name |
a |
sp.name |
a |
eval.sp |
(optional, default |
eval.env |
(optional, default |
eval.xy |
(optional, default |
PA.nb.rep |
(optional, default |
PA.strategy |
(optional, default |
PA.nb.absences |
(optional, default |
PA.dist.min |
(optional, default |
PA.dist.max |
(optional, default |
PA.sre.quant |
(optional, default |
PA.user.table |
(optional, default |
na.rm |
(optional, default |
filter.raster |
(optional, default |
Slots
dir.namea
charactercorresponding to the modeling foldersp.namea
charactercorresponding to the species namecoorda 2-columns
data.framecontaining the correspondingXandYcoordinatesdata.speciesa
vectorcontaining the species observations (0,1orNA)data.env.vara
data.framecontaining explanatory variablesdata.maska
SpatRasterobject containing the mask of the studied areahas.data.evala
logicalvalue defining whether evaluation data is giveneval.coord(optional, default
NULL)
A 2-columnsdata.framecontaining the correspondingXandYcoordinates for evaluation dataeval.data.species(optional, default
NULL)
Avectorcontaining the species observations (0,1orNA) for evaluation dataeval.data.env.var(optional, default
NULL)
Adata.framecontaining explanatory variables for evaluation dataPA.strategya
charactercorresponding to the pseudo-absence selection strategyPA.tablea
data.framecontaining the corresponding table of selected pseudo-absences (indicated byTRUEorFALSE) from thepa.tablist element returned by thebm_PseudoAbsencesfunction
Author(s)
Damien Georges
See Also
BIOMOD_FormatingData, bm_PseudoAbsences,
bm_Tuning, bm_CrossValidation,
BIOMOD_Modeling, bm_RunModelsLoop
Other Toolbox objects:
BIOMOD.ensemble.models.out,
BIOMOD.formated.data,
BIOMOD.models.options,
BIOMOD.models.out,
BIOMOD.options.dataset,
BIOMOD.options.default,
BIOMOD.projection.out,
BIOMOD.stored.data,
biomod2_ensemble_model,
biomod2_model
Examples
showClass("BIOMOD.formated.data.PA")
## ----------------------------------------------------------------------- #
library(terra)
# Load species occurrences (6 species available)
data(DataSpecies)
head(DataSpecies)
# Select the name of the studied species
myRespName <- 'GuloGulo'
# Keep only presence informations
DataSpecies <- DataSpecies[which(DataSpecies[, myRespName] == 1), ]
# 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)
## ----------------------------------------------------------------------- #
# Format Data with pseudo-absences : random method
myBiomodData <- BIOMOD_FormatingData(resp.var = myResp,
expl.var = myExpl,
resp.xy = myRespXY,
resp.name = myRespName,
PA.nb.rep = 4,
PA.strategy = 'random',
PA.nb.absences = 1000)
myBiomodData
plot(myBiomodData)