Learn R Programming

Deducer (version 0.7-9)

dich: dich

Description

splits a variable into two groups

Usage

dich(variables,data=NULL,cut=NULL,group1=NULL,group2=NULL)

Arguments

variables
variables to be dichotomized
data
A data.frame
cut
An optional cut point dividing factor into two groups.
group1
An optional vector of levels of factor defining group 1.
group2
An optional vector of levels of factor defining group 2.

Value

a data.frame containing the variables, recoded into two groups.