Learn R Programming

fastStat (version 1.4)

to.labels: Give Labels to Factor

Description

Give Labels to Factor

Usage

to.labels(x, labels)

Arguments

x

factor or numeric variable

labels

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,labels=c('0:Female','1:Man'))
# }

Run the code above in your browser using DataLab