Learn R Programming

RVAideMemoire (version 0.9-83-2)

dummy: Dummy responses

Description

Creates a matrix of dummy responses from a factor. Needed in some multivariate analyses.

Usage

dummy(f, simplify = TRUE)

Arguments

f

vector (internally transformed into factor).

simplify

logical indicating if the last column of the response matrix should be removed (to avoid model overfitting).

Author

Maxime HERVE <maxime.herve@univ-rennes1.fr>

Examples

Run this code
fac <- gl(3,5,labels=LETTERS[1:3])
dummy(fac)

Run the code above in your browser using DataLab