View source: R/guidedPLS-internal.R
dummyMatrix | R Documentation |
A label vector is converted to a dummy matrix.
dummyMatrix(y, center=TRUE)
y |
A label vector to specify the group of data. |
center |
An option to center the rows of matrix (Default: TRUE). |
A matrix is generated. The number of row is equal to the length of y and the number of columns is the number of unique elements of y.
Koki Tsuyuzaki
y <- c(1, 3, 2, 1, 4, 2)
dummyMatrix(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.