diff --git a/NAMESPACE b/NAMESPACE index 9462053d..2e37b67c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -94,7 +94,6 @@ importFrom(jsonlite,fromJSON) importFrom(lifecycle,deprecate_stop) importFrom(lubridate,as_date) importFrom(lubridate,dmy) -importFrom(lubridate,dmy_hms) importFrom(lubridate,mdy) importFrom(lubridate,month) importFrom(lubridate,year) diff --git a/R/Colombia.R b/R/Colombia.R index 1381dafa..103bb28e 100644 --- a/R/Colombia.R +++ b/R/Colombia.R @@ -74,7 +74,7 @@ Colombia <- R6::R6Class("Colombia", #' @description Colombia specific data cleaning #' @importFrom dplyr select mutate rename summarise group_by n - #' @importFrom lubridate dmy_hms as_date + #' @importFrom lubridate as_date #' @importFrom stringr str_replace_all str_to_sentence str_to_title #' @importFrom rlang .data #' @@ -86,7 +86,7 @@ Colombia <- R6::R6Class("Colombia", ) %>% group_by(date, level_2_region_code) %>% summarise(cases_new = n(), .groups = "drop") %>% - mutate(date = as_date(dmy_hms(date)), + mutate(date = as_date(date), level_2_region_code = sprintf("%05d", level_2_region_code)) %>% left_join( self$codes_lookup$`2`, diff --git a/tests/testthat/custom_data/Colombia_level_1.rds b/tests/testthat/custom_data/Colombia_level_1.rds index 4893c7fb..07aee3a3 100644 Binary files a/tests/testthat/custom_data/Colombia_level_1.rds and b/tests/testthat/custom_data/Colombia_level_1.rds differ diff --git a/tests/testthat/custom_data/Colombia_level_2.rds b/tests/testthat/custom_data/Colombia_level_2.rds index 4893c7fb..07aee3a3 100644 Binary files a/tests/testthat/custom_data/Colombia_level_2.rds and b/tests/testthat/custom_data/Colombia_level_2.rds differ