Learn R Programming

SensMixed (version 2.1-0)

convertToFactors: converts variables of the data frame to factors

Description

the user specifies which variables he/she would like to consider as factors, the functions converts them to factors

Usage

convertToFactors(data, facs)

Arguments

data

data frame

facs

vector with names of variables that the user would like to convert to factors

Value

returns the same data frame as in the input but with the specified variables converted to factors

Examples

Run this code
# NOT RUN {
library(SensMixed)

str(ham)

ham <- convertToFactors(ham, c("Gender"))

str(ham)
# }

Run the code above in your browser using DataLab