koplsDummy {kopls}R Documentation

Convertion of integer vector to dummy matrix

Description

Converts integer vector to binary class matrix ('dummy' matrix).

Usage

koplsDummy(class)

Arguments

class Integer vector containing values denoting class belonging.
numClasses Number of classes. If NA, the number of unique entries in class will be used instead.

Value

A matrix with rows corresponding to observations and columns to classes. Each element in matrix is either one (observation belongs to class) or zero (observation does not belong to class).

Author(s)

Max Bylesjo and Mattias Rantalainen

References

Rantalainen M, Bylesjo M, Cloarec O, Nicholson JK, Holmes E and Trygg J. Kernel-based orthogonal projections to latent structures (K-OPLS), J Chemometrics 2007; 21:376-385. doi:10.1002/cem.1071.

Examples






[Package kopls version 1.0.3 Index]