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

loadItemAttrib

Load item attributes


Description

loadItemAttrib is a data loading function to create an item_attrib object. loadItemAttrib can read item attributes a data.frame or a .csv file.

Usage

loadItemAttrib(object, pool, file = NULL)

Arguments

object

item attributes. Can be a data.frame or the file path of a .csv file. The content should at least include column 'ID' that matches with the item_pool object.

pool

an item_pool object. Use loadItemPool for this.

file

(deprecated) use object argument instead.

Value

loadItemAttrib returns an item_attrib object.

See Also

Examples

## Read from data.frame:
itempool_science   <- loadItemPool(itempool_science_data)
itemattrib_science <- loadItemAttrib(itemattrib_science_data, itempool_science)

## Read from file: write to tempdir() for illustration and clean afterwards
f <- file.path(tempdir(), "itemattrib_science.csv")
write.csv(itemattrib_science_data, f, row.names = FALSE)
itemattrib_science <- loadItemAttrib(f, itempool_science)
file.remove(f)

## TestDesign 1.1.0 - Deprecated arguments
## Not run: 
loadItemAttrib(object = "iatt.csv", pool) # is equivalent to
loadItemAttrib(file   = "iatt.csv", pool) # 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.