get_categorical: get_categorical

Description Usage Arguments Value See Also Examples

View source: R/get_categorical.R

Description

Identify categorical variables from a data frame of mixed variable types
Comparison operators used are <= and >=
NA values do not contribute to level counts

Usage

1
get_categorical(df, lower = 3, upper = 6)

Arguments

df

data frame of mixed variable types

lower

minimum number of unique values to be considered categorical

upper

maximum number of unique values to be considered categorical

Value

data frame containing only ID and variables meeting the criteria

See Also

Other filter functions: colfilter, get_binary, get_check, get_continuous, min_cat_n, min_n, remove_incomplete_obs, remove_outliers, rowfilter

Examples

1
2
3
require(NHANES)
data(NHANES)
head(get_categorical(NHANES))

HallLab/clarite documentation built on Oct. 27, 2020, 6:27 p.m.