Skip to content

Commit

Permalink
Merge pull request #175 from inbo/remove_schemes_use_n2khabmon
Browse files Browse the repository at this point in the history
Drop two built-in data sources; deprecate `read_schemes()` and `read_scheme_types()`
  • Loading branch information
florisvdh authored Dec 1, 2023
2 parents 4bd3d48 + c22796c commit 6d6cc99
Show file tree
Hide file tree
Showing 30 changed files with 66 additions and 4,831 deletions.
3 changes: 3 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Suggests:
jsonlite,
knitr,
mapview,
n2khabmon,
openssl,
raster (>= 3.6-3),
readxl,
Expand All @@ -65,5 +66,7 @@ Suggests:
units,
utils,
withr
Remotes:
inbo/n2khabmon
VignetteBuilder: knitr
Config/testthat/edition: 3
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ importFrom(stringr,str_split)
importFrom(stringr,str_squish)
importFrom(stringr,str_sub)
importFrom(stringr,str_to_title)
importFrom(tidyr,gather)
importFrom(tidyr,nest)
importFrom(tidyr,spread)
importFrom(tidyr,tribble)
importFrom(tidyr,unnest)
importFrom(utils,packageDescription)
Expand Down
5 changes: 2 additions & 3 deletions R/datawrangling.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,20 @@
#' A data frame, either identical or longer than the input data frame.
#'
#' @seealso
#' \code{\link{read_scheme_types}},
#' \code{\link{read_types}},
#' \code{\link{read_habitatmap_terr}},
#' \code{\link{read_watersurfaces_hab}}
#'
#' @examples
#' library(dplyr)
#' x <-
#' read_scheme_types() %>%
#' n2khabmon::read_scheme_types() %>%
#' filter(scheme == "GW_05.1_terr")
#' expand_types(x)
#' expand_types(x, strict = FALSE)
#'
#' x <-
#' read_scheme_types() %>%
#' n2khabmon::read_scheme_types() %>%
#' filter(scheme == "GW_05.1_terr") %>%
#' group_by(typegroup)
#' expand_types(x)
Expand Down
32 changes: 32 additions & 0 deletions R/n2khab-deprecated.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#' Deprecated functions
#'
#' - [`read_schemes()`] has moved to package `n2khabmon`.
#' Use [`n2khabmon::read_schemes()`] instead.
#' - [`read_scheme_types()`] has moved to package `n2khabmon`.
#' Use [`n2khabmon::read_scheme_types()`] instead.
#'
#' @param ... arguments passed to the new function
#'
#' @md
#'
#' @name n2khab-deprecated

#' @rdname n2khab-deprecated
#' @export
#' @keywords internal
read_schemes <- function(...) {
.Deprecated("n2khabmon::read_schemes")
require_pkgs("n2khabmon")
n2khabmon::read_schemes(...)
}



#' @rdname n2khab-deprecated
#' @export
#' @keywords internal
read_scheme_types <- function(...) {
.Deprecated("n2khabmon::read_scheme_types")
require_pkgs("n2khabmon")
n2khabmon::read_scheme_types(...)
}
Loading

0 comments on commit 6d6cc99

Please sign in to comment.