Learn R Programming

dst (version 1.3.0)

marrayToMatrix: Transformation of an array data to a matrix-represented relation

Description

The array representation or product space representation is converted to the matrix representation of the corresponding relation.

Usage

marrayToMatrix(mtt, infovar)

Arguments

mtt

The matrix tt of the relation in multiarray format

infovar

specification of the number and size of each variable

Value

tt The matrix representation of the data.

Examples

Run this code
# NOT RUN {
 wr_infovar = matrix(c(4,5,2,2), ncol = 2, 
 dimnames = list(NULL, c("varnb", "size")) )
 mtt <- array(c(0,1,0,0,0,0,0,1,0,1,0,1,1,0,1,0,1,1,1,0,1,0,1,1,1,1,1,1), c(2,2,7), 
 dimnames = list( RdWorks=c("rWdy", "rWdn") , Rain=c("Ry", "Rn"), ev=1:7))
z <- marrayToMatrix(mtt, wr_infovar)

# }

Run the code above in your browser using DataLab