Skip to content

Commit 71aadc1

Browse files
Add extra burden outcomes
1 parent 5be3808 commit 71aadc1

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

R/constants.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ burden_outcome_names <- c(
2727
"cases",
2828
"deaths",
2929
"dalys",
30-
"yll"
30+
"yll",
31+
"deaths_cwyx",
32+
"cases_cwyx",
33+
"dalys_cwyx",
34+
"yll_cwyx",
35+
"rubella_deaths_congenital",
36+
"rubella_cases_congenital"
3137
)
3238

3339
#' @name constants

R/plotting_prep.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ prep_plot_age <- function(burden) {
9696

9797
burden_long <- tidyr::pivot_longer(
9898
burden,
99-
{{ burden_outcome_names }},
99+
tidyr::any_of(burden_outcome_names),
100100
names_to = "burden_outcome"
101101
)
102102

@@ -145,7 +145,7 @@ prep_plot_burden_decades <- function(burden, year_max) {
145145

146146
burden_data <- tidyr::pivot_longer(
147147
burden_data,
148-
{{ burden_outcome_names }},
148+
tidyr::any_of(burden_outcome_names),
149149
names_to = "burden_outcome"
150150
)
151151

@@ -169,7 +169,7 @@ prep_plot_global_burden <- function(burden) {
169169

170170
burden_long <- tidyr::pivot_longer(
171171
burden,
172-
{{ burden_outcome_names }},
172+
tidyr::any_of(burden_outcome_names),
173173
names_to = nesting_cols
174174
)
175175

man/constants.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)