To set certain parameters that are randomly generated within an exercise
file to specific values, a copy of the exercise file is generated in
the temporary directory of the R session. In the temporary copy of the
exercise file the first assignment to the specified parameter in the first
code chunk is replaced with the definition provided in expar
.
To work properly, the parameter of interest must be defined with
a standard assignment in the first code chunk at the beginning of a line.
The original definition of the parameter must be in a single line only
(typically using something like sample
or runif
etc.).
After replacing the code chunk, expar
returns the path to the
temporary file with the modified exercise. This can then be processed
with exams2xyz
"as usual".