Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

loadStAttrib

Load set/stimulus/passage attributes


Description

loadStAttrib is a data loading function to create an st_attrib object. loadStAttrib can read stimulus attributes a data.frame or a .csv file.

Usage

loadStAttrib(object, item_attrib, file = NULL)

Arguments

object

set attributes. Can be a data.frame or the file path of a .csv file. The content should at least include the column 'STID' referring to the column 'STID' in the data slot of the item_attrib object.

item_attrib

an item_attrib object. Use loadItemAttrib for this.

file

(deprecated) use object argument instead.

Value

loadStAttrib returns a st_attrib object.

  • data a data.frame containing stimulus attributes.

See Also

dataset_reading for examples.

Examples

## Read from data.frame:
itempool_reading   <- loadItemPool(itempool_reading_data)
itemattrib_reading <- loadItemAttrib(itemattrib_reading_data, itempool_reading)
stimattrib_reading <- loadStAttrib(stimattrib_reading_data, itemattrib_reading)

## Read from file: write to tempdir() for illustration and clean afterwards
f <- file.path(tempdir(), "stimattrib_reading.csv")
write.csv(stimattrib_reading_data, f, row.names = FALSE)
stimattrib_reading <- loadStAttrib(f, itemattrib_reading)
file.remove(f)

## TestDesign 1.1.0 - Deprecated arguments
## Not run: 
loadStAttrib(object = "satt.csv", item_attrib) # is equivalent to
loadStAttrib(file   = "satt.csv", item_attrib) # pre 1.1.0

## End(Not run)

TestDesign

Optimal Test Design Approach to Fixed and Adaptive Test Construction

v1.2.2
GPL (>= 2)
Authors
Seung W. Choi [aut, cre] (<https://orcid.org/0000-0003-4777-5420>), Sangdon Lim [aut] (<https://orcid.org/0000-0002-2988-014X>)
Initial release
2021-01-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.