which.dummy: Identify which columns are dummy variables on a data frame.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/which.dummy.R

Description

Given a data frame and an optional variable name, which.dummy identifies which colummns are dummy variables by the column index.

Usage

1

Arguments

data

An object with a 'dummies' attribute

name

Optional. The name of a column that has been expanded to a dummy variable.

Details

Given a data frame and an optional variable name, returns the indices of the dummy columns.

Requires an dummies attribute, usually created by dummy.data.frame.

Value

integer vector of column indices corresponding to the dummy variable(s)

Author(s)

Christopher Brown

See Also

dummy.data.frame, dummy

Examples

1
2
3

Example output

dummies-1.5.6 provided by Decision Patterns

[1] 5 6 7

dummies documentation built on May 2, 2019, 3:43 p.m.