| BIOMOD.formated.data.PA | R Documentation |
BIOMOD_FormatingData() output object class (with pseudo-absences)Class returned by BIOMOD_FormatingData, and used by
bm_Tuning, bm_CrossValidation and
BIOMOD_Modeling
## 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
)
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 |
dir.namea character corresponding to the modeling folder
sp.namea character corresponding to the species name
coorda 2-columns data.frame containing the corresponding X and Y
coordinates
data.speciesa vector containing the species observations (0, 1 or
NA)
data.env.vara data.frame containing explanatory variables
data.maska SpatRaster object containing
the mask of the studied area
has.data.evala logical value defining whether evaluation data is given
eval.coord(optional, default NULL)
A 2-columns data.frame containing the corresponding X and Y
coordinates for evaluation data
eval.data.species(optional, default NULL)
A vector containing the species observations (0, 1 or NA) for
evaluation data
eval.data.env.var(optional, default NULL)
A data.frame containing explanatory variables for evaluation data
PA.strategya character corresponding to the pseudo-absence selection strategy
PA.tablea data.frame containing the corresponding table of selected
pseudo-absences (indicated by TRUE or FALSE) from the pa.tab list
element returned by the bm_PseudoAbsences function
Damien Georges
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
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.