Questions related to the computer-based generation of exams (e.g., for classical written exams or e-learning platforms like Moodle) in particular with the R package "exams".
Questions tagged [r-exams]
256 questions
1
vote
1 answer
Multiple plots in repeated question yields "Error in exm[[dups[j]]] : subscript out of bounds"
When creating worksheets with exams2pdf() from R/exams, I like to repeat an exercise file multiple times to yield different numbers. However, when I include two plots in an exercise (e.g., one in the question and one in the solution) this…

TwelveFifths
- 25
- 4
1
vote
1 answer
R package `exams` - not importing R markdown
I recently installed the R package exams in order to generate some qti format quizzes for a course I am about to teach, but have been unable to import R markdown files.
I tried with the example file switzerland.Rmd available here:…

user1521655
- 486
- 3
- 17
1
vote
2 answers
R exams package weird behaviour with dplyr
I have noted to strange behaviour in the R exams package when I load the dplyr library. the below example only works if I explicitly call the dplyr namespace, as indicated in the comments. notice that the error only occurs in a fresh session, i.e.…

Florian Oswald
- 5,054
- 5
- 30
- 38
1
vote
1 answer
LaTeX formulas in answers of ARSnova system
I'm using the R/Exams package to generate quizzes for the ARSnova platform, but I can not get the LaTeX formulas correctly displayed in the answers of the quizzes. The formulas are well displayed in the questions but not in the answers. I've tried…

Alfredo Sánchez
- 725
- 1
- 7
- 19
1
vote
2 answers
Different orders of questions in exams2pdf() from R/exams
I am using the R package exams. I am trying to generate four versions of exactly the same exam with R/exams, but with each having a different question order. Also, I would like to have full control over the order. For example, if I have four…

francis
- 21
- 2
0
votes
0 answers
Error in nops_eval(register = "C:/Users....: length(attr(scans, "check")) == 0L is not TRUE
When trying to mark an exam:
ev1 <- nops_eval(
register = "C:/Users/(...) /R_Exam2/nops_scan/lista.csv",
solutions = "C:/Users/(...) /R_Exam2/nops_pdf/BSc_Soc_MiniTeste3_20221116.rds",
scans = Sys.glob( "C:/Users/(...)…

Amilcar Moreira
- 11
- 2
0
votes
1 answer
exams2pdf latex error !Missing $ inserted
I am puzzled with this error when compiling an exercise with exams2pdf():
Exam 1: ICvar (srt) ... w! Missing $ inserted.
$
l.7 ...rime 2}}{\chi^2_{1-\frac{\alpha}{2};(n-1)}}
…

JPMD
- 644
- 1
- 7
- 19
0
votes
1 answer
Is it possible to create a question based for r-exams, based on Venn diagrams code from TikZ?
I'm trying to create a question in RMarkdown, using r-exams, based on the Venn diagrams package from TikZ https://www.ctan.org/pkg/venndiagram. I can't get it to work properly.
Here part of my code:
grafika01<-'
\\begin{tikzpicture}
…

Álvaro Ángel Molina
- 141
- 2
- 7
0
votes
0 answers
R/Exams in R-Markdown not generating HTML file
I am working on an interactive module using R-markdown and compiling in HTML.
I have been trying to use r/Exams as working with learnr was a super pain in the ass without using a shiny server.
I have been testing question creation using a simple…

A.May
- 11
- 4
0
votes
1 answer
How to insert text in num_to_schoice?
I'm building on the deriv2.Rnw question from the r-exams package, which includes num_to_schoice to randomize the answer options of a schoice question:
sc <- NULL
while(is.null(sc)) {
## parameters
a <- sample(2:9, 1)
b <- sample(seq(2, 4, 0.1), 1)
c…

Álvaro Ángel Molina
- 141
- 2
- 7
0
votes
1 answer
Questions with a fixed and pre-specified number of true and false answers
I would like to use the R/exams package to create multiple-choice questions for a Moodle quiz. However, I am not sure whether R/exams can always choose a fixed number of correct items. Suppose we have a question with the following…

PaulS
- 21,159
- 2
- 9
- 26
0
votes
1 answer
Is it possible to change the exams result to a different scale?
We created an exam with a total of 29 points. However, we would like to present to students the HTML using a 0 to 20 scale (Points row of the HTML; with the nops_eval function):
The corresponding points of each exercise (summing a total of 29)…

Sinval
- 1,315
- 1
- 16
- 25
0
votes
0 answers
Is exams' solution pdf first page editable?
After creating the exams' solution, I noticed that the first page uses some default information. Can I edit the university, subject and date? The date is not the same used in the argument date = "16-01-2021":
exams2pdf(exercises,
n = 1,
…

Sinval
- 1,315
- 1
- 16
- 25
0
votes
0 answers
How show points of each question when producing exams' solution?
When producing an exams' solution using exams2pdf(... template="solution",...) I define I showpoints=T, however, no points are shown for each of the questions. I get:
instead of:

Sinval
- 1,315
- 1
- 16
- 25
0
votes
1 answer
Why does `exams` prints the figure legend when plotting `ggplot2` plots?
When I use exams2nops() or exams2moodle()
Question
========
Some questions...
pacman::p_load(ggplot2, magrittr)
#make sample data
groups <- letters[23:26]
df <- data.frame(x = rnorm(n = 60,mean = 3.5, sd = 3.4),
y = rnorm(n =…

Sinval
- 1,315
- 1
- 16
- 25