R Under development (unstable) (2025-12-22 r89219 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library("exams") > oopt <- options(device.ask.default = FALSE, exams_tex = "tools") > > ## define an exam (= list of exercises) > myexam <- list( + "tstat2.Rmd", + "ttest.Rmd", + "relfreq.Rmd", + "anova.Rmd", + c("boxplots.Rmd", "scatterplot.Rmd"), + "cholesky.Rmd" + ) > > ## create multiple exams on the disk (in a temporary directory) > dir.create(mydir <- tempfile()) > > ## generate NOPS exam in temporary directory > set.seed(403) > ex1 <- exams2nops(myexam, n = 2, dir = mydir) > dir(mydir) [1] "metainfo.rds" "nops1.pdf" "nops2.pdf" > > ## use a few customization options: different > ## university/logo and language/title > ## with a replacement sheet but for non-duplex printing > set.seed(403) > ex2 <- exams2nops(myexam, n = 2, dir = mydir, + institution = "Universit\\\\\"at Innsbruck", + name = "uibk", logo = "uibk-logo-bw.png", + title = "Klausur", language = "de", + replacement = TRUE, duplex = FALSE) > dir(mydir) [1] "metainfo.rds" "nops1.pdf" "nops2.pdf" "uibk.rds" "uibk1.pdf" [6] "uibk2.pdf" > > options(exams_tex = oopt$exams_tex) > > proc.time() user system elapsed 4.45 0.59 47.75