# exams2pdf

0th

Percentile

##### Generation of Exams in PDF Format

Automatic generation of exams in PDF format.

Keywords
utilities
##### Usage
exams2pdf(file, n = 1L, nsamp = NULL, dir = ".", template = "plain",  inputs = NULL, header = list(Date = Sys.Date()), name = NULL,  control = NULL, encoding = "", quiet = TRUE, transform = NULL, edir = NULL, tdir = NULL, sdir = NULL, verbose = FALSE, points = NULL, ...)  make_exams_write_pdf(template = "plain", inputs = NULL, header = list(Date = Sys.Date()), name = NULL, quiet = TRUE, control = NULL)
##### Arguments
file
character. A specification of a (list of) exercise files.
n
integer. The number of copies to be compiled from file.
nsamp
integer. The number of exercise files sampled from each list element of file. Sampling without replacement is used if possible. (Only if some element of nsamp is larger than the length of the corresponding element in file, sampling with replacement is used.)
dir
character specifying the output directory (default: current working directory). If only a single PDF file is produced and no dir is explicitly specified, the file is displayed on the screen rather than saved in dir.
template
character. A specification of a LaTeX template. The package currently provides "exam", "solution", "plain". For details see below.
inputs
character. Names of files that are needed as inputs during LaTeX compilation (e.g., style files, headers). Either the full path must be given or the file needs to be in edir.
list. A list of further options to be passed to the LaTeX files.
name
character. A name prefix for resulting exercises, by default chosen based on template.
control
A list of control arguments for the appearance of multiple choice results (see details).
encoding
character, passed to xweave.
quiet
logical. Should output be suppressed when calling xweave and texi2dvi.
transform
function. An optional transform driver passed to xexams (by default no transformation is used).
edir
character specifying the path of the directory in which the files in file are stored (see also below).
tdir
character specifying a temporary directory, by default this is chosen via tempdir. Note that this is cleaned up and potentially temporary files are deleted.
sdir
character specifying a directory for storing supplements, by default this is chosen via tempdir.
verbose
logical. Should information on progress of exam generation be reported?
points
integer. How many points should be assigned to each exercise? Note that this argument overules any exercise points that are provided within the expoints tags of the exercise files (if any). The vector of points supplied should either have length 1 or the number of exercises in the exam.
...
further arguments passed on to xweave.

##### References

Gruen B, Zeileis A (2009). Automatic Generation of Exams in R. Journal of Statistical Software, 29(10), 1--14. http://www.jstatsoft.org/v29/i10/.

Zeileis A, Umlauf N, Leisch F (2014). Flexible Generation of E-Learning Exams in R: Moodle Quizzes, OLAT Assessments, and Beyond. Journal of Statistical Software, 58(1), 1--36. http://www.jstatsoft.org/v58/i01/.

xexams, exams, texi2dvi

##### Aliases
• exams2pdf
• make_exams_write_pdf
##### Examples
## load package and enforce par(ask = FALSE)

if(interactive()) {
## compile a single random exam (displayed on screen)
exams2pdf(list(
"boxplots",
c("tstat", "ttest", "confint"),
c("regression", "anova"),
"scatterplot",
"relfreq"
))
}

Documentation reproduced from package exams, version 2.1-0, License: GPL-2 | GPL-3

### Community examples

Looks like there are no examples yet.