Description Usage Arguments Value Author(s) See Also Examples
View source: R/vector_to_dummy.r
Create a dummy matrix based on the elements of a vector. Each column in the produced matrix is a dummy indicator.
1  |   vector_to_dummy(avector)
 | 
avector | 
 a numeric vector  | 
A matrix of dummy variables
Gaston Sanchez
list_to_dummy,
factor_to_dummy
1 2 3 4 5  | # let's say you have a list like this
num_vec = c(2, 3, 1, 4)
# get dummy matrix
vector_to_dummy(num_vec)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.