rmd <- system.file("extdata/template01.Rmd", package = "rexer")
ex <- exam(
rmd = rmd,
examinees = NULL,
instances_num = 10,
random = TRUE,
reorder_exercises = TRUE,
select_n_exercises = NULL
) |>
define_an_exercise(
type = 'p',
statement = 'What is the three-letter country code (ISO 3166-1 alpha-3) for
the country represented in the figure below?',
image = paste0(system.file("extdata/figures", package = "rexer"), "/", '[[1]]'),
image_alt = 'Country outline.',
answer = c('ESP', 'CHL', 'NZL', 'ITA'),
c('spain.png', 'chile.png', 'new_zealand.png', 'italy.png')
)
Run the code above in your browser using DataLab