View source: R/loading_functions.R
item_attrib-class | R Documentation |
loadItemAttrib
is a data loading function to create an item_attrib
object.
loadItemAttrib
can read item attributes a data.frame
or a .csv file.
loadItemAttrib(object, pool, file = NULL)
object |
item attributes. Can be a |
pool |
an |
file |
(deprecated) use |
loadItemAttrib
returns an item_attrib
object.
data
a data.frame
containing item attributes.
dataset_science
, dataset_reading
, dataset_fatigue
, dataset_bayes
for 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.