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)
a vector
containing binary values (either 0
or 1
)
a numeric
between 0
and 1
corresponding to the proportion
of obs
values to sample
(optional, default FALSE
)
A logical
value defining whether output should be returned as a vector
of
TRUE/FALSE
values or integer
values corresponding to the indices of obs
elements to be kept
(optional, default NULL
)
An integer
value corresponding to the new seed value to be set
A list
containing the following elements :
calibration
: elements selected for calibration
validation
: elements selected for validation (complementary to the
calibration set)
Other Secondary 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()