as.twolevel {RelativeRisk}R Documentation

As two level

Description

Changes a column of a data frame into a vector with levels 0 and 1.

Usage

        as.twolevel(cName,data,levs)

Arguments

cName The quoted column name to change
data A matrix or data frame.
levs A vector of levels. All variable values that are in levs will be changed to 0, and all others to 1.

Value

A data frame with changes in column Name.

Author(s)

Bob Wheeler bwheelerg@gmail.com

Please cite this program as follows:

Wheeler, R.E. (2009). as.twolevel RelativeRisk. The R project for statistical computing http://www.r-project.org/


[Package RelativeRisk version 1.1-1 Index]