Learn R Programming

TestDesign (version 1.0.2)

buildConstraints: Build constraints

Description

Read constraints from specified files.

Usage

buildConstraints(
  pool,
  file_constraints,
  file_item_attrib,
  file_st_attrib = NULL
)

Arguments

pool

An item_pool object. Use loadItemPool for this.

file_constraints

Character. The name of the file containing constraint specifications.

file_item_attrib

Character. The name of the file containing item attributes.

file_st_attrib

(Optional) Character. The name of the file containing set attributes.

Value

A list containing the parsed constraints, to be used in Static and Shadow.

Examples

Run this code
# NOT RUN {
## Write to tempdir() and clean afterwards
f1 <- file.path(tempdir(), "constraints_science.csv")
write.csv(constraints_science_raw, f1, row.names = FALSE)
f2 <- file.path(tempdir(), "itemattrib_science.csv")
write.csv(itemattrib_science_raw, f2, row.names = FALSE)

constraints <- buildConstraints(itempool_science, f1, f2)

file.remove(f1)
file.remove(f2)

# }

Run the code above in your browser using DataLab