Learn R Programming

fastStat (version 1.4)

list.factor: Return All Factor Variables

Description

Return all factor variables in a dataframe or matrix

Usage

list.factor(x, levels = FALSE)

Arguments

x

a dataframe or matrix

levels

logical. TRUE to display levels for factor variable.

Value

factor variable names and levels

Examples

Run this code
# NOT RUN {
jh=data.frame(x=c(1,2,3,1),
    k=c(4,5,6,7),
    h=c('a','a','b','b'))
list.factor(jh)
# }

Run the code above in your browser using DataLab