diff --git a/R/coercion.R b/R/coercion.R index a4b906973..1c6d112f9 100644 --- a/R/coercion.R +++ b/R/coercion.R @@ -258,12 +258,12 @@ is_epiparameter_df <- function(x) { pathogen <- .unique(x$pathogen, var_name = "pathogen") # get disease from pathogen lookup - disease <- switch( - pathogen, + disease <- switch(pathogen, "Marburg virus" = "Marburg Virus Disease", "Lassa mammarenavirus" = "Lassa fever", "Ebola virus" = "Ebola Virus Disease", - stop("Pathogen in epireview not recognised", call. = FALSE) + "SARS-CoV" = "Severe Acute Respiratory Syndrome (SARS)", + stop("Pathogen in {epireview} not recognised", call. = FALSE) ) epi_name <- .unique(x$parameter_type, var_name = "parameter types") prob_dist <- .unique(x$distribution_type, var_name = "distribution types") diff --git a/R/data.R b/R/data.R index 120524b41..567be506f 100644 --- a/R/data.R +++ b/R/data.R @@ -1,11 +1,9 @@ #' A vector of `character` strings with the core column names of the #' epidemiological parameter data exported by the \pkg{epireview} R package. #' -#' A subset of data from the World Health Organization Global Tuberculosis -#' Report ... -#' #' @format ## `epireview_core_cols` -#' A `character` vector with 56 elements +#' A `character` vector with `r length(epiparameter::epireview_core_cols)` +#' elements. #' #' The data is taken as the intersection of the column names of each of the #' disease parameter tables in the \pkg{epireview} R package. diff --git a/data-raw/epireview_core_cols.R b/data-raw/epireview_core_cols.R index 0008d9fe4..e62a882d5 100644 --- a/data-raw/epireview_core_cols.R +++ b/data-raw/epireview_core_cols.R @@ -6,20 +6,23 @@ if (requireNamespace("epireview", quietly = TRUE)) { epireview_marburg <- epireview::load_epidata("marburg") epireview_ebola <- epireview::load_epidata("ebola") epireview_lassa <- epireview::load_epidata("lassa") + epireview_sars <- epireview::load_epidata("sars") - intersect_marburg_ebola <- intersect( + epireview_core_cols <- intersect( colnames(epireview_marburg$params), colnames(epireview_ebola$params) ) epireview_core_cols <- intersect( - intersect_marburg_ebola, + epireview_core_cols, colnames(epireview_lassa$params) ) + epireview_core_cols <- intersect( + epireview_core_cols, + colnames(epireview_sars$params) + ) usethis::use_data( epireview_core_cols, overwrite = TRUE, version = 3 ) } - - diff --git a/data/epireview_core_cols.rda b/data/epireview_core_cols.rda index f08fb3dac..a7c7ac92d 100644 Binary files a/data/epireview_core_cols.rda and b/data/epireview_core_cols.rda differ diff --git a/man/epireview_core_cols.Rd b/man/epireview_core_cols.Rd index 170ffaf88..e60135191 100644 --- a/man/epireview_core_cols.Rd +++ b/man/epireview_core_cols.Rd @@ -8,7 +8,8 @@ epidemiological parameter data exported by the \pkg{epireview} R package.} \format{ \subsection{\code{epireview_core_cols}}{ -A \code{character} vector with 56 elements +A \code{character} vector with 58 +elements. The data is taken as the intersection of the column names of each of the disease parameter tables in the \pkg{epireview} R package. @@ -21,7 +22,7 @@ disease parameter tables in the \pkg{epireview} R package. epireview_core_cols } \description{ -A subset of data from the World Health Organization Global Tuberculosis -Report ... +A vector of \code{character} strings with the core column names of the +epidemiological parameter data exported by the \pkg{epireview} R package. } \keyword{datasets}