Learn R Programming

OpenRepGrid (version 0.1.9)

importExcelInternal: ImportExcelInternal is the parser for importExcel.

Description

ImportExcelInternal is the parser for importExcel that constructs an import object. The .xlsx or .xls file has to be in specified fixed format. The first row contains the minimum of the rating scale, the names of the elements and the maximum of the rating scale. Below every row contains the left construct pole, the ratings and the right construct pole.

Usage

importExcelInternal(file, dir = NULL, sheetIndex = 1, min = NULL, max = NULL)

Arguments

file
Filename including path if file is not in current working directory. File can also be a complete URL. The fileformat is .xlsx or .xls.
dir
Alternative way to supply the directory where the file is located (default NULL).
sheetIndex
The number of the Excel sheet that contains the grid data.
min
Optional argument (numeric, default NULL) for minimum rating value in grid.
max
Optional argument (numeric, default NULL) for maximum rating value in grid.

Value

List of relevant data.

Details

1 & element 1 & element 2 & element 3 & 5 1 & element 1 & element 2 & element 3 & 5 1 & element 1 & element 2 & element 3 & 5 1 & element 1 & element 2 & element 3 & 5

Note that the maximum and minimum value has to be defined using the min and max arguments if no values are supplied at the beginning and end of the first row. Otherwise the scaling range is inferred from the available data and a warning is issued as the range may be erroneous. This may effect other functions that depend on knowing the correct range and it is thus strongly recommended to set the scale range correctly.

A sample Excel file can be found here: http://www.openrepgrid.uni-bremen.de/data/grid.xlsx.

Examples

Run this code
## Not run: 
# 
# # supposing that the data file sample.txt is in the current directory
# file <- "grid.xlsx"
# imp <- importExcelInternal(file)
# 
# # specifying a directory (arbitrary example directory)
# dir <- "/Users/markheckmann/data"
# imp <- importExcelInternal(file, dir)
# 
# # using a full path
# imp <- importExcelInternal("/Users/markheckmann/data/grid.xlsx")
# ## End(Not run)

Run the code above in your browser using DataLab