indicator12_to_indicator01: Convert (one or more) 1/2 indicator variables to 1/0...

View source: R/indicator12_to_indicator01.R

indicator12_to_indicator01R Documentation

Convert (one or more) 1/2 indicator variables to 1/0 indicator variables

Description

NOTE: This converts the 2s to 0s and leaves the 1s and 1s!!

Usage

indicator12_to_indicator01(vars, df)

Arguments

vars

A character vector of variable names

df

The data frame in which to look for vars

Value

df, with vars converted to 0/1 indicators (binary variables)


jgabry/RHhelpers documentation built on Feb. 22, 2024, 12:56 p.m.