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

Description Usage Arguments Value Examples

Description

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

Usage

1
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

1
2
3
4
5
6
7
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)

RndTexExams documentation built on May 2, 2019, 6:10 a.m.