Learn R Programming

fastStat (version 1.4)

to.factor<-: Set Factor Class

Description

Set Factor Class

Usage

to.factor(x) <- value

Arguments

x

the data that you want to set

value

levels, the first value is the reference. If the length of value is 1, no levels will be given to x

Value

factor x

Examples

Run this code
# NOT RUN {
to.factor(mtcars$gear) <- c(4,3,5)
# }

Run the code above in your browser using DataLab