Learn R Programming

tangram (version 0.7.1)

as.categorical: Convert data type to a factor if it's not already

Description

Convert data type to a factor if it's not already

Usage

as.categorical(x)

Value

Data as a factor

Arguments

x

Data to convert to factor

Examples

Run this code

as.categorical(1:3)

Run the code above in your browser using DataLab