levelCheck: Check Levels in a Data Frame or Matrix

View source: R/levelCheck.R

levelCheckR Documentation

Check Levels in a Data Frame or Matrix

Description

This function checks each variable in a data frame or matrix 'y' for the number of unique levels. If any variable contains 10 or more unique levels, a warning is issued suggesting consideration of continuous methods. It returns the unique values across all variables as a numeric vector.

Usage

levelCheck(y)

Arguments

y

A data frame or matrix to check for levels of variables.

Value

Numeric vector of all unique values across all variables in 'y'.

Examples

y <- data.frame(a = 1:5, b = factor(c("yes", "no", "yes", "maybe", "no")))
levelCheck(y)


stueller/longCatEDA documentation built on March 9, 2024, 4:08 a.m.