Description Usage Arguments Value Author(s) References See Also Examples
Make binary dummy variables out of a factor vector
1 |
x |
A factor vector. Or a vector that is convertible to a factor. |
red |
Logical. Shall redundancy be retained? When a factor variable is broken down to binary dummy variables it is typically not wanted to transfer all levels to 0/1 vectors but to skip the last level because the information is already contained in the sum of the other variables. |
Returns a data.frame with binary data (0/1) with as many (n) rows as x has levels (with red
=TRUE) or with n-1 levels when red
=FALSE.
Gerald Jurasinski, gerald.jurasinski@uni-rostock.de
Legendre & Legendre 1998. Numerical ecology. Elsevier
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.