getSetZeroBin {monaLisa} | R Documentation |
Get and set the zero bin manually
getZeroBin(bins) setZeroBin(bins, zeroBin)
bins |
Factor, typically the return value of
|
zeroBin |
Numeric or character scalar indicating the level to use as the zero bin, or NA. |
For getZeroBin
, the index of the level representing the zero bin.
For setZeroBin
, a modified factor with the zero bin set to the
provided value.
set.seed(1) x <- rnorm(100) bins <- bin(x, "equalN", nElements = 10, minAbsX = 0.5) getZeroBin(bins) bins <- setZeroBin(bins, 2)