Learn R Programming

echoice2 (version 0.2.4)

ec_undummy_lowhigh: Convert dummy-coded variables to low/high factor

Description

Convert dummy-coded variables to low/high factor

Usage

ec_undummy_lowhigh(vec_in)

Value

A factor vector with levels "low" and "high"

Arguments

vec_in

A vector of dummy-coded variables (0/1)

Examples

Run this code
ec_undummy_lowhigh(c(0,1,0,1,1))


Run the code above in your browser using DataLab