[This article was first published on
R/exams, and kindly contributed to
R-bloggers]. (You can report issue about the content on this page
here)
Want to share your content on R-bloggers?
click here if you have a blog, or
here if you don't.
Single-choice knowledge quiz question in which the correct flag for a country has to be selected from a list of flags.
Description:
The exercise contains a large list of countries from all continents around the world along with their direct neighbors (sharing a border) and their secondary neighbors (neighbors of neighbors). Flags are generated from the ISO 3166-1 alpha-2 codes, either via their Unicode symbols (especially in HTML-based output) or using the {worldflags} LaTeX package (in PDF output).
Randomization:
Shuffling (1 out of 136 countries)
Mathematical notation:
No
Verbatim R input/output:
No
Demo code:
library("exams")
set.seed(403)
exams2html("flags.Rmd")
set.seed(403)
exams2pdf("flags.Rmd", usepackage = "worldflags")
set.seed(403)
exams2html("flags.Rnw")
set.seed(403)
exams2pdf("flags.Rnw", usepackage = "worldflags")
Continue reading:
flags: Fun with Flags