Creates questions for the ranking quiz by combining acute (micromort) and chronic (microlife) risks, converting to a common Loss of Life Expectancy (LLE) scale, and grouping into rankable sets.
Usage
ranking_quiz_questions(
tags = NULL,
items_per_question = 3L,
n_questions = 5L,
seed = NULL,
difficulty = NULL
)Arguments
Character vector of tags to include (e.g. "Radiation", "Travel"). Use
NULLfor all tags. Seeranking_tag_mapping()for available tags.- items_per_question
Integer. Number of items per question (2, 3, or 4). Default 3.
- n_questions
Integer. Number of questions to generate. Default 5.
- seed
Optional integer seed for reproducibility.
- difficulty
Optional difficulty level: "easy", "medium", "hard", or "mixed". Easy = large LLE spread within question, hard = small spread.
Value
A tibble with columns:
question_id,tag,item_name,item_source("acute"/"chronic"),lle_minutes,micromorts,microlives_per_day,category,description,help_url,correct_rank,difficulty
Examples
ranking_quiz_questions(tags = "Travel", n_questions = 3, seed = 42)
#> # A tibble: 9 × 12
#> question_id tag item_name item_source lle_minutes micromorts
#> <int> <chr> <chr> <chr> <dbl> <dbl>
#> 1 1 Travel Train (1000 miles) acute 21.0 1
#> 2 1 Travel Commuting by bicycle (3… acute 10.5 0.5
#> 3 1 Travel Frequent executive flye… acute 3.16 0.15
#> 4 2 Travel Flying (8h long-haul) acute 82.0 3.9
#> 5 2 Travel Flying (5h medium-haul) acute 36.8 1.75
#> 6 2 Travel Commuting by car (30 mi… acute 2.73 0.13
#> 7 3 Travel Motorcycling (60 miles) acute 210. 10
#> 8 3 Travel Flying (2h short-haul) acute 23.1 1.1
#> 9 3 Travel Business traveller (ann… acute 0.789 0.0375
#> # ℹ 6 more variables: microlives_per_day <dbl>, category <chr>,
#> # description <chr>, help_url <chr>, correct_rank <int>, difficulty <chr>
