View source: R/change_cata_format.R
change_cata_format | R Documentation |
CATATIS and CLUSCATA operate on data where the blocksvariables are merged horizontally. If you have a different format, you can use this function to change the format. Format=1 is for data merged vertically with the dataset of the first subject, then the second,... with products in same order Format=2 is for data merged vertically with the dataset for the first product, then the second... with subjects in same order
Unlike change_cata_format2, you don't need to specify products and subjects, just make sure they are in the right order.
change_cata_format(Data, nprod, nattr, nsub, format=1, NameProds=NULL, NameAttr=NULL)
Data |
data frame or matrix. Correspond to your data |
nprod |
integer. Number of products |
nattr |
integer. Number of attributes |
nsub |
integer. Number of subjects. |
format |
integer (1 or 2). See the description |
NameProds |
string vector with the names of the products (length must be nprod) |
NameAttr |
string vector with the names of attributes (length must be nattr) |
The arranged data for CATATIS and CLUSCATA function
catatis
, cluscata
, change_cata_format2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.