Learn R Programming

mixOmics (version 2.8-1)

map: Converts an indicator matrix to class vector

Description

Converts a matrix in which each row sums to 1 into the nearest matrix of (0,1) indicator variables. Borrowed from the mclust package, used as internal function.

Usage

map(Y,...)

Arguments

Y
An indicator (dummy) matrix.
...
Provided to allow lists with elements other than the arguments can be passed in indirect or list calls with do.call.

Value

  • A integer vector with one entry for each row of Y, in which the i-th value is the column index at which the i-th row of Y attains a maximum.

encoding

latin1

References

C. Fraley and A. E. Raftery (2002). Model-based clustering, discriminant analysis, and density estimation. Journal of the American Statistical Association 97:611-631. C. Fraley and A. E. Raftery (2006). MCLUST Version 3 for R: Normal Mixture Modeling and Model-Based Clustering, Technical Report no. 504, Department of Statistics, University of Washington.

See Also

unmap