RndTexExams (version 1.4.1)

rte.The.Randomizer: Function to randomize a question in a dataframe (internal use)

Description

Function to randomize a question in a dataframe (internal use)

Usage

rte.The.Randomizer(q.text, q.answers, case.now, my.rdn.idx.answers)

Arguments

q.text

Main text of question (character)

q.answers

The answers of the questions as an atomic vector (each alternative as an item)

case.now

The random case to build the string (only used for textual switches)

my.rdn.idx.answers

The random index of the questions

Value

A list with the text of the full questions, among other things

Examples

Run this code
# NOT RUN {
q.text <- '\\question Whats my name \\n'
q.answers <- c('\\choice Mario', '\\choice Roberto','\\choice Marcelo')

case.now <- 1
my.rdn.idx.answers <- sample(seq(length(q.answers)))

l.out <- rte.The.Randomizer(q.text,q.answers, case.now, my.rdn.idx.answers)
# }

Run the code above in your browser using DataLab