Learn R Programming

reporttools (version 1.1.3)

attachYesNo: Attach levels no and yes to a 0-1 vector.

Description

Attach levels "no" and "yes" to a 0-1 vector and turn it into a factor.

Usage

attachYesNo(v)

Arguments

v

Vector.

Value

Factor with the corresponding levels.

Examples

Run this code
# NOT RUN {
set.seed(1977)
vec <- round(runif(10, 0, 1))
attachYesNo(vec)
# }

Run the code above in your browser using DataLab