Skip to contents

Simple check on the grouping variable

Usage

check.valid.groups(
  group.var = NULL,
  data.df = NULL,
  cor.vars = NULL,
  verbose = FALSE
)

Arguments

group.var

Name of grouping variable.

data.df

data frame of all variables including the variable specified in group.var as factor.

cor.vars

Name(s) of variables to which the grouping should be applied to.

verbose

when TRUE additional information is printed. Defaults to FALSE.

Value

list with data.df, indexes of variables to which the grouping should be applied to and the associated group for each observation as integer.