get_all_factors {labelr} | R Documentation |
get_all_factors
returns a list of character vectors, where each character
vector is a given factor variable's unique levels, and where the vector
is given the same name as the factor variable itself. If the data.frame
contains no factors, an empty (length 0) list is returned.
get_all_factors(data)
data |
the data.frame you are checking for factor variables. |
A list of 0, 1, or more character variables.
class(get_all_factors(iris))
length(get_all_factors(iris))
zz <- iris
zz$u <- zz$Species # zz has two factor variables
class(get_all_factors(zz))
length(get_all_factors(zz))
get_all_factors(mtcars)
length(get_all_factors(mtcars))