Learn R Programming

iNZightPlots (version 2.16.0)

convert.to.factor: Convert to Factor

Description

Convert a numeric variable in to a factor with four levels.

Usage

convert.to.factor(x)

Value

a factor variable

Arguments

x

a numeric vector

Author

Tom Elliott

Examples

Run this code
f <- convert.to.factor(runif(100, 0, 10))
levels(f)

Run the code above in your browser using DataLab