Learn R Programming

Deducer (version 0.9-1)

dich: dich

Description

splits a variable into two groups

Usage

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

Value

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

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.