diff --git a/DESCRIPTION b/DESCRIPTION index 0700155..854e0ca 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: epireview Title: Tools to update and summarise the latest pathogen data from the Pathogen Epidemiology Review Group (PERG) -Version: 1.3.0 +Version: 1.3.1 Authors@R: c( person("Rebecca", "Nash", email = "r.nash@imperial.ac.uk", role = "aut", comment = c(ORCID = "0000-0002-5213-4364")), diff --git a/NAMESPACE b/NAMESPACE index 244e916..a9e9ecb 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -124,6 +124,7 @@ importFrom(readr,col_double) importFrom(readr,col_integer) importFrom(readr,col_logical) importFrom(readr,read_csv) +importFrom(readr,read_delim) importFrom(readr,write_csv) importFrom(scales,squish) importFrom(stats,na.omit) @@ -139,7 +140,6 @@ importFrom(tidyr,pivot_wider) importFrom(tidyr,replace_na) importFrom(tm,removeNumbers) importFrom(utils,globalVariables) -importFrom(utils,read.csv2) importFrom(validate,"%vin%") importFrom(validate,confront) importFrom(validate,summary) diff --git a/NEWS.md b/NEWS.md index 241c85d..87b16fa 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# epireview 1.3.1 + +* BUG-FIX: Fixes #104 using readr::read_delim to read in parameter type short names + # epireview 1.3.0 * MAJOR RELEASE diff --git a/R/load_epidata.R b/R/load_epidata.R index 98cd898..a44da2d 100644 --- a/R/load_epidata.R +++ b/R/load_epidata.R @@ -86,7 +86,7 @@ short_parameter_type <- function(x, parameter_type_full, parameter_type_short) { #' of the outbreaks extracted for this pathogen, where available. #' #' @importFrom dplyr left_join -#' @importFrom utils read.csv2 +#' @importFrom readr read_delim #' @importFrom cli cli_alert_info cli_alert_warning cli_abort cli_alert_success #' @export load_epidata <- function(pathogen, mark_multiple = TRUE) { @@ -138,9 +138,10 @@ load_epidata <- function(pathogen, mark_multiple = TRUE) { ) articles_everything <- articles articles <- articles[, cols] - - param_names <- read.csv2( - system.file("extdata", "param_name.csv", package = "epireview") + + param_names <- read_delim( + system.file("extdata", "param_name.csv", package = "epireview"), + delim = ";" ) params <- short_parameter_type( params, param_names$parameter_type_full, param_names$parameter_type_short