dummyMatrix {guidedPLS}R Documentation

Toy model data for using dNMF, dSVD, dsiNMF, djNMF, dPLS, dNTF, and dNTD

Description

A label vector is converted to a dummy matrix.

Usage

dummyMatrix(y, center=TRUE)

Arguments

y

A label vector to specify the group of data.

center

An option to center the rows of matrix (Default: TRUE).

Value

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.

Author(s)

Koki Tsuyuzaki

Examples

y <- c(1, 3, 2, 1, 4, 2)
dummyMatrix(y)

[Package guidedPLS version 1.0.0 Index]