ToColumnValueIncidenceMatrix: Convert to incidence matrix by column values.

Description Usage Arguments See Also

View source: R/DataConversionFunctions.R

Description

Replaces each a column of a integer matrix with number of columns corresponding to the integer values. The matrix [[2,3],[1,2]] is converted to [[0,0,1,0,0,0,0,1],[0,1,0,0,0,0,1,0]] .

Usage

1
ToColumnValueIncidenceMatrix(mat, rowNames = TRUE, colNames = TRUE)

Arguments

mat

an integer matrix to be converted to column value incidence matrix.

rowNames

boolean to assign or not the result matrix row names to be the argument matrix row names

colNames

boolean to assign or not the result matrix column names derived from the argument matrix column names

See Also

Other Sparse matrix transformation functions: ConvertMultiColumnDataFrameToSparseMatrix(), SparseMatrixToTriplets(), TripletsToSparseMatrix()


antononcube/ERTMon-R documentation built on Oct. 14, 2021, 2:27 p.m.