check.factor: Determine if a variable should be of factor class

Description Usage Arguments Value Examples

Description

Determine if a variable should be of factor class

Usage

1
check.factor(data, check.levels = F, threshold = 10)

Arguments

data

A dataframe

check.levels

Boolean indicating whether we want to transform dataset (FALSE) or only return number of levels factor variables would have if converted (TRUE)

Value

A dataframe where some columns have been converted to factor class or a named vector where potential factor variables are associated with number of levels they would have if converted

Examples

1
2
3
4
## Not run: 
check.factor(df_FAO,check.levels = T)
df <- check.factor(df_FAO)
## End(Not run)

linogaliana/OpenCancer documentation built on May 30, 2019, 3:43 p.m.