getSetZeroBin: Get and set the zero bin manually

getSetZeroBinR Documentation

Get and set the zero bin manually

Description

Get and set the zero bin manually

Usage

getZeroBin(bins)

setZeroBin(bins, zeroBin)

Arguments

bins

Factor, typically the return value of bin.

zeroBin

Numeric or character scalar indicating the level to use as the zero bin, or NA.

Value

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.

Examples

set.seed(1)
x <- rnorm(100)
bins <- bin(x, "equalN", nElements = 10, minAbsX = 0.5)
getZeroBin(bins)
bins <- setZeroBin(bins, 2)


fmicompbio/monaLisa documentation built on Nov. 2, 2024, 1:33 p.m.