View source: R/readCATACubeData.R
read.xls.CATA | R Documentation |
read.xls.CATA
reads the CATA data from an Excel File and creates a Brick of Data
and a contingency table. The contingency table can be analyzed
by correspondence analysis or Hellinger analysis.
The cube of data is needed to perform correct
cross-validation methods such as
permutations
tests, bootstrap confidence intervals, and
bootstrap ratios.
With I products, J adjectives and K judges
The data in the excel file are organized as:
row 1 column 1 = name of Judge 1
row 1 columns (2 to J + 1) name of the adjectives
row 2 column 1 = name of product 1.
row 2 column (2 to J + 1) 0/1 answers
of Judge 1 to the J adjectives for product 1
....
row I+1 column 1 = name of product I
row 2 column (2 to J + 1) 0/1 answers
row I + 2 column 1 = name of product 1.
row 2 column (2 to J + 1) 0/1 answers
of Judge 2 to the J adjectives for product 1
....
And so on till the last judge.
See the help for the excel
file OrangeJuiceCATARawData.xlsx
for an example of how the excel file should
be organized.
@section Implementation
Current version uses Wickham's readxl
package
and so does not need rJava
.
Current version: is July 11, 2017.
read.xls.CATA( path2file, sheet2read, orderProducts = TRUE, threshold4cleaning = 0 )
path2file |
the name of the |
sheet2read |
the name of the sheet in the excel file. |
orderProducts |
if |
threshold4cleaning |
the cleaning threshold:
The columns whose total
is smaller than |
A list with CATA.Brick
a "product by adjective by judge" Brick of 0/1 data
(1 if Judge chose adjective for product, 0 if not);
ContingencyTable
:
A "product by adjective" contingency table;
CleanedContingencyTable
:
A "product by adjective" cleaned contingency table
(columns whose sum is equal or below threshold are dropped).
Herve Abdi
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.