Access intervention names
Opened this issue · 0 comments
pratikunterwegs commented
This issue requests a function to more easily access intervention names. An alternative is to have c.*_intervention()
construct names by combining component names.
It could save users lots of time to have a helper function to automatically extract from the
intervention_scenarios
object, e.g.
extract_names <- function(scenario) {
names <- sapply(scenario, function(x) x$name)
paste(names, collapse = " + ")
}
labels <- sapply(intervention_scenarios, extract_names)
labels[names(labels)=="baseline"] <- "None"
Although have noticed that combined_intervention
just pulls the name of the first one included. Perhaps neater for this vignette to define like the other combined scenarios? Unless I'm missing an easy way to grab both intervention names?
Originally posted by @adamkucharski in #176 (comment)