imat: indicator variables

Description Usage Arguments Value Examples

View source: R/imatdat.R

Description

converts a single categorical variable into indicator variables

Usage

1
imat(x, allcat = TRUE)

Arguments

x

A factor variable.

allcat

Whether or not to keep all categories or leave the last one out.

Value

matrix

Examples

1
2
require(MASS)
imat(housing$Type)

extracat documentation built on July 17, 2018, 5:05 p.m.

Related to imat in extracat...