is.consistent.changeLevels: Check levelChanges consistency

Description Usage Arguments Value

View source: R/data.R

Description

Check that the levels provided in a levelChanges list match those that are already present.

Usage

1
2
  is.consistent.changeLevels(x, levelChanges,
    allowMissingCols)

Arguments

x

a data frame

levelChanges

A list, of the form generated by generateFactorRenamer

allowMissingCols

A logical or a character vector. If it is a logical, it indicates whether to allow some columns of x not to be included in levelChanges. If TRUE, only a warning is issue if there are columns missing. If FALSE, an error is given. If it is a character vector, it contains the names of any columns that are allowed not to be included in levelChanges.

Value

The data from x[, levelChanges], with as prescribed by levelChanges.


rjbgoudie/utils.rjbg documentation built on May 27, 2019, 9:13 a.m.