toMatrix {cata} | R Documentation |
Converts 3d array of CATA data to a tall 2d matrix format
Description
Converts a three-dimensional array (I
assessors, J
products, M
attributes) to a two-dimensional matrix with
(I
assessors, J
products) rows and (M
attributes) columns, optionally preceded by two columns of row headers.
Usage
toMatrix(X, header.rows = TRUE, oneI = FALSE, oneM = FALSE)
Arguments
X |
three-dimensional array ( |
header.rows |
|
oneI |
indicates whether calculation is for one assessor (default:
|
oneM |
indicates whether calculation is for one attribute (default:
|
Value
A matrix with I
assessors * J
products in rows
and M
attributes in columns (preceded by 2 columns)
of headers if header.rows = TRUE
Examples
data(bread)
# convert CATA results from the first 8 consumers and the first 4 attributes
# to a tall matrix
toMatrix(bread$cata[1:8,,1:4])
[Package cata version 0.1.0.6 Index]