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.name
a
character
corresponding to the modeling foldersp.name
a
character
corresponding to the species namecoord
a 2-columns
data.frame
containing the correspondingX
andY
coordinatesdata.species
a
vector
containing the species observations (0
,1
orNA
)data.env.var
a
data.frame
containing explanatory variablesdata.mask
a
SpatRaster
object containing the mask of the studied areahas.data.eval
a
logical
value defining whether evaluation data is giveneval.coord
(optional, default
NULL
)
A 2-columnsdata.frame
containing the correspondingX
andY
coordinates for evaluation dataeval.data.species
(optional, default
NULL
)
Avector
containing the species observations (0
,1
orNA
) for evaluation dataeval.data.env.var
(optional, default
NULL
)
Adata.frame
containing explanatory variables for evaluation dataPA.strategy
a
character
corresponding to the pseudo-absence selection strategyPA.table
a
data.frame
containing the corresponding table of selected pseudo-absences (indicated byTRUE
orFALSE
) from thepa.tab
list element returned by thebm_PseudoAbsences
function
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)