Skip to content

Commit 491e37b

Browse files
committed
🚧 Print check inequalities list
1 parent e7493d2 commit 491e37b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

R/mod_inequalities_server.R

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,20 @@ mod_inequalities_server <- function(id, params) {
104104
readr::write_csv(inequalities_data(), file)
105105
}
106106
)
107+
108+
shiny::observe({
109+
inequalities <-
110+
hrg$selections |>
111+
dplyr::filter(choice != "No change") |>
112+
dplyr::mutate(
113+
choice = stringr::str_to_snake(stringr::str_to_lower(.data$choice))
114+
) |>
115+
dplyr::group_by(.data$choice) |>
116+
dplyr::summarise(hrg_codes = list(.data$hrg_code)) |>
117+
tibble::deframe() |>
118+
jsonlite::toJSON(auto_unbox = FALSE, pretty = TRUE)
119+
120+
print(inequalities)
121+
})
107122
})
108123
}

0 commit comments

Comments
 (0)