Skip to contents

Regroup Values According to Configuration

Usage

regroupedValues(
  values,
  config = NULL,
  labels = "labels1",
  to.factor = FALSE,
  to.numeric = TRUE,
  dbg = TRUE
)

Arguments

values

vector of values

config

configuration (list) describing how to regroup. If the list contains an element breaks the function groupByBreaks is called to group values together that belong to the same intervals that are defined by the breaks. Otherwise the list must contain an element values and an element of the name given in labels (default: "labels1"). These are given to the function regroup that performs a "value to label"-regrouping.

labels

default: "labels1"

to.factor

if TRUE the new values are converted to factor. The default is FALSE.

to.numeric

(default: TRUE, overrides to.factor!), passed to regroup

dbg

if TRUE (default) debug messages are shown