From aff45c63b8bebf9c7b6eb111195e4c62a47c762b Mon Sep 17 00:00:00 2001 From: Sam Abbott Date: Sat, 5 Feb 2022 19:01:41 +0000 Subject: [PATCH] drop dep args from get_regional_data --- R/get_regional_data.R | 26 ------------------------- tests/testthat/test-get_regional_data.R | 13 ------------- 2 files changed, 39 deletions(-) diff --git a/R/get_regional_data.R b/R/get_regional_data.R index bf533566..f3bbb97d 100644 --- a/R/get_regional_data.R +++ b/R/get_regional_data.R @@ -13,11 +13,6 @@ #' @param country A character string specifying the country to get data from. #' Not case dependent. Name should be the English name. For a list of #' options use `get_available_datasets()`. -#' @param include_level_2_regions `r lifecycle::badge("deprecated")` Boolean. If TRUE, returns data stratified by -#' level 2 regions. If FALSE, stratified by Level 1. Note that Level 2 region -#' data is not always available. In these cases the user will get a warning -#' and the Level 1 data will be returned. -#' @param localise_regions `r lifecycle::badge("deprecated")` Logical, defaults to TRUE. Should region names be localised. #' @inheritParams return_data #' @inheritParams initialise_dataclass #' @return A tibble with data related to cases, deaths, hospitalisations, @@ -47,28 +42,7 @@ get_regional_data <- function(country, level = "1", totals = FALSE, localise = TRUE, steps = FALSE, class = FALSE, verbose = TRUE, regions, - include_level_2_regions = deprecated(), - localise_regions = deprecated(), ...) { - if (is_present(include_level_2_regions)) { - deprecate_warn( - "0.9.0", - "covidregionaldata::get_regional_data(include_level_2_regions = )", "covidregionaldata::get_regional_data(level = )" - ) - if (include_level_2_regions) { - level <- "1" - } else { - level <- "2" - } - } - - if (is_present(localise_regions)) { - deprecate_warn( - "0.9.0", - "covidregionaldata::get_regional_data(localise_regions = )", "covidregionaldata::get_regional_data(localise = )" - ) - localise <- localise_regions - } # check data availability and initiate country class if available region_class <- initialise_dataclass( diff --git a/tests/testthat/test-get_regional_data.R b/tests/testthat/test-get_regional_data.R index ec826ad6..1cc59b90 100644 --- a/tests/testthat/test-get_regional_data.R +++ b/tests/testthat/test-get_regional_data.R @@ -46,19 +46,6 @@ test_get_regional_data <- function(level) { verbose = FALSE ) ) - # test depreciated args - if (level == "2") { - expect_warning(get_regional_data("mexico", - level = level, - include_level_2_regions = TRUE, verbose = FALSE - )) - expect_warning( - get_regional_data("mexico", - localise_regions = TRUE, - verbose = FALSE - ) - ) - } }) }