Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop two built-in data sources; deprecate read_schemes() and read_scheme_types() #175

Merged
merged 4 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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