cut3: Divide numeric variable into bins

cut3R Documentation

Divide numeric variable into bins

Description

Divide numeric variable into bins

Usage

cut3(
  x,
  cuts,
  m = 150,
  g,
  levels.mean = FALSE,
  digits,
  minmax = TRUE,
  oneval = TRUE,
  onlycuts = FALSE
)

Arguments

x

numeric vector to be binned

cuts

numeric values to cut x into

m

same use as cut2

g

same use as cut2

levels.mean

same value as cut2

digits

same value as cut2

minmax

same value as cut2

oneval

same value as cut2

onlycuts

same value as cut2

Value

A numeric vector

Note

This function was based on cut2 from the Hmisc package. Instead of returning factors it returns numeric values representating the mean of the bins

Examples

pkpdData = example.pkpdData()
sunique(cut3(pkpdData$wt, g = 10, levels.mean = TRUE))
lunique(cut3(pkpdData$wt, g = 10, levels.mean = TRUE))

qPharmetra/qpToolkit documentation built on May 24, 2023, 8:52 a.m.