Learn R Programming

fastStat (version 1.4)

to.labels<-: Give Labels to Factor

Description

Give Labels to Factor

Usage

to.labels(x) <- value

Arguments

x

factor or numeric variable

value

labels separated by colon

Value

factor variable with lables, the first lable will be treated as reference.

Examples

Run this code
# NOT RUN {
to.labels(x=mtcars$am) <- c('0:Female','1:Man')
# }

Run the code above in your browser using DataLab