Learn R Programming

explore (version 1.3.4)

guess_cat_num: 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)

Value

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

Arguments

var

A vector (dataframe column)

descr

A description of the variable (optional)

Examples

Run this code
guess_cat_num(iris$Species)

Run the code above in your browser using DataLab