R/utils_get_all_conditions.R

Defines functions get_all_conditions

Documented in get_all_conditions

#' Get All Conditions
#'
#' Extracts the names of the conditions from the current params
#'
#' @param params the current params used in the model
#'
#' @return a character vector of the condition names
#'
#' @importFrom dplyr %>%
#' @importFrom purrr map
#' @import rlang
get_all_conditions <- function(params) {
  params$groups %>%
    map("conditions") %>%
    map(names) %>%
    unname() %>%
    flatten_chr() %>%
    unique() %>%
    sort()
}
The-Strategy-Unit/723_mh_covid_surge_modelling documentation built on April 13, 2022, 8:52 a.m.