sqp_construct: Construct an SQP 3.0 tibble manually

Description Usage Arguments Details Value Examples

View source: R/sqp_construct.R

Description

sqp_construct is designed to create SQP tibbles by manually inserting new metrics such as quality or validity.

Usage

1
2
3
sqp_construct(question_name, metrics, all_columns = FALSE)

sqp_construct_(question_name, metrics, all_columns = FALSE)

Arguments

question_name

a character string that will be used as the question name

metrics

a list containing new SQP metrics. Currently it only supports quality, reliability and validity. Can also specify one of the metrics and the remaining are set to NA by default

all_columns

if TRUE will return all columns (quite a few) that can be returned by the get_estimates function. See get_estimates for the description of which variables would be created. If FALSE (default) it will return only columns question, quality, reliability and validity.

Details

sqp_construct_ is useful if you're interested in programming with sqpr rather than using it interactively. If you want to use sqp_construct inside a function, use the equivalent sqp_construct_ which uses standard evaluation.

Value

a tibble of one row with the supplied metrics. It also has class sqp for further manipulations within the sqpr package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
sqp_construct(new_question, list(quality = 0.3))

sqp_construct(new_question, list(quality = 0.3, validity = 0.2))

## Note that specifying a column which is not availabe in SQP 3.0 data
## will throw an error

## Not run: 
sqp_construct(new_question, list(random_col = 0.3, validity = 0.2))
# Error: One or more of the specified metrics don't match the SQP column names

## End(Not run)

recsm-asqme/sqpr documentation built on May 28, 2020, 4:06 p.m.