guess_cat_num: Return if variable is categorical or numerical

View source: R/tools.R

guess_cat_numR Documentation

Return if variable is categorical or numerical

Description

Guess if variable is categorical or numerical based on name, type and values of variable

Usage

guess_cat_num(var, descr)

Arguments

var

A vector (dataframe column)

descr

A description of the variable (optional)

Value

"cat" (categorical), "num" (numerical) or "oth" (other)

Examples

guess_cat_num(iris$Species)

explore documentation built on Sept. 11, 2024, 7:40 p.m.