get.par: Get a parameter from the current context

Description Usage Arguments Value Author(s) See Also Examples

Description

This function generates (if needed) the required target from a context

Usage

1
get.par(target, pars, progress = FALSE)

Arguments

target

a character string indicates the target's name

pars

an object of context class describes the given context

progress

a boolean value indicates if the generating process should be printed or not

Value

if success, a list with two components

value

value of the target

context

the corresponding context

if not success, NULL

Author(s)

Hoang-Trieu Trinh, thtrieu@apcs.vn

See Also

gen

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Declare a context
p <- pars(students = 20, items = 15)
# Regular way to access information inside a context
p$students # returns 20
# get.par is a alternative
get.par("students", p)
# However, it is not trivial to generate a skill mastery matrix from p
p$M # NULL returned
# get.par can do this
M <- get.par("M", p, progress = TRUE)
print(M)

thtrieu/edmsyn documentation built on May 31, 2019, 11:18 a.m.