levelsStringForColName: Generate factor renamer for column

Description Usage Arguments Value

View source: R/data.R

Description

Generate a factor renamer for an individual column of a data.frame

Usage

1
2
  levelsStringForColName(colName, x, newlines = "level",
    sort = F)

Arguments

colName

A character vector of length 1, indicating which column of x the string should be created for.

x

a data frame

newlines

A character variable. Either "variable" or "level". In the former case, each variable is one a separate line in the result. In the latter case, newlines are additionally placed after each level.

sort

A logical indicating whether the levels should be sorted, according to their numeric order

Value

A character vector. This is an individual component of the list described in generateFactorRenamer.


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