read.df.excel {DistatisR}R Documentation

read.df.excel reads distatis formated ranking or sorting data from an excel file.

Description

read.df.excel reads distatis formated ranking or sorting data from an excel file.

Usage

read.df.excel(path, sheet, col_names = TRUE, voc.sheet = NULL)

Arguments

path

the name of the .xlsx file (including the path to the directory if needed, and the .xlsx extension). No default.

sheet

the name of the sheet where the (e.g., Sorting or Ranking) data are stored. No default.

col_names

(default TRUE) parameter col.names from readxl::read_excel: "TRUE to use the first row as column names, FALSE to get default names, or a character vector giving a name for each column."

voc.sheet

If not NULL (default) gives the name of the sheet where an optional contingency table (products by names) could be stored. Needs to have the same row names as the sorting/ranking data frame (df.data) to be useful (but he program does not check).

@return a list with one data frame '$df.data' (contains the data) when 'voc.sheet = NULL' or if not: two data frames '$df.data' (contains the data) and '$df.voc' (contains the vocabulary).

Details

@details The data are read from an excel file in which the rows are the Products to evaluate and the columns are the Assessors (e.g., Judges, Participants, Subjects, Evaluators). Depending upon the type of data, the numbers represent a partition, a rank, or a score. These data are used as input of DistanceFromSort or DistanceFromRank. A contingency table for the vocabulary can also be read in a different sheet. read.df.excel is a (small) shell on top of readxl::read_excel, note however that whereas readxl::read_excel returns a tibble, read.df.excel returns a list with one or two (depending upon the options) dataframe(s).

Author(s)

Herve Abdi


[Package DistatisR version 1.1.1 Index]