dichot: dichot

Description Usage Arguments Value Examples

Description

dichot will take a variable and dichotomize it into 0, 1 (and NA for any unspecified levels)

Usage

1
dichot(x, group1, group2)

Arguments

x

input data

group1

vector of levels to be set to 0

group2

vector of levels to be set to 1

Value

output vector of 0, 1, NA

Examples

1
2
#fakeData <- data.frame(x = sample(c(1, 2, 3, 4, 5), 20, replace = T))
#dichot(x = fakeData$x, group1 = c(1, 2), group2 = c(3, 4))

TaylorAndrew/atClean documentation built on May 9, 2019, 4:21 p.m.