input_excel: Input Excel

Description Usage Arguments Details Value Examples

View source: R/input_excel.R

Description

Reads excel files containing factor loadings and latent correlations for IPV charts.

Usage

1
input_excel(global = NULL, tests)

Arguments

global

character; name of the excel file containing factor loadings from the global level and the test level, and latent correlations from the test level.

tests

character; name(s) of the excel file(s) containing factor loadings from the test level and the facet level, and latent correlations from the facet level.

Details

Note that the excel files need a very specific structure. Use the example files as templates.

The global argument defaults to NULL. This allows to only use the tests argument, resulting in a simple model with one test and its facets.

Value

List containing formatted data including center distances for item_chart, facet_chart, and nested_chart.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# read data for a simple model by ignoring the "global" parameter of input_excel
single_file <- system.file("extdata", "DSSEI.xlsx", package = "IPV", mustWork = TRUE)
x <- input_excel(tests = single_file)

# read data for a nested model
# note that the data needs to be split into several excel files as in the example
global <- system.file("extdata", "IPV_global.xlsx", package = "IPV", mustWork = TRUE)
tests <- c(system.file("extdata", "IPV_DSSEI.xlsx", package = "IPV", mustWork = TRUE),
             system.file("extdata", "IPV_SMTQ.xlsx", package = "IPV", mustWork = TRUE),
             system.file("extdata", "IPV_RSES.xlsx", package = "IPV", mustWork = TRUE))
x <- input_excel(global = global, tests = tests)

NilsPetras/IPV documentation built on Dec. 7, 2018, 8:55 a.m.