Skip to contents

Apply Regrouping of Values in a Data Frame

Usage

doRegroupings(
  Data,
  regroup.actual = kwb.utils::selectElements(settings, "regroup.actual"),
  regroup.config = kwb.utils::selectElements(settings, "regroup.config"),
  settings = NULL,
  checkRemaining = TRUE,
  to.factor = FALSE,
  to.numeric = TRUE,
  dbg = TRUE
)

Arguments

Data

data frame

regroup.actual

default: settings$regroup.actual

regroup.config

default: settings$regroup.config

settings

list of settings that may contain the elements regroup.actual and regroup.config

checkRemaining

if TRUE (default) it is checked if all values that occurred in a column to be regrouped have been considered in the regrouping

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