View source: R/bm_SampleBinaryVector.R
| bm_SampleBinaryVector | R Documentation |
This internal biomod2 function allows the user to sample a binary vector
keeping the same proportion of 0 and 1 as the initial vector.
bm_SampleBinaryVector(obs, ratio, as.logical = FALSE, seedval = NULL)
obs |
a |
ratio |
a |
as.logical |
(optional, default |
seedval |
(optional, default |
A list containing the following elements :
calibration : elements selected for calibration
validation : elements selected for validation (complementary to the
calibration set)
Damien Georges
Other Secundary functions:
bm_BinaryTransformation(),
bm_CrossValidation(),
bm_FindOptimStat(),
bm_MakeFormula(),
bm_ModelingOptions(),
bm_PlotEvalBoxplot(),
bm_PlotEvalMean(),
bm_PlotRangeSize(),
bm_PlotResponseCurves(),
bm_PlotVarImpBoxplot(),
bm_PseudoAbsences(),
bm_RunModelsLoop(),
bm_SRE(),
bm_SampleFactorLevels(),
bm_Tuning(),
bm_VariablesImportance()
## Generate a binary vector
vec.a <- sample(c(0, 1), 100, replace = TRUE)
## Generate calibration / validation datasets
bm_SampleBinaryVector(obs = vec.a, ratio = 0.7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.