From d9d6157b63105b30166bc0dfc1ab100bde4ba288 Mon Sep 17 00:00:00 2001 From: Dax Kellie Date: Wed, 15 Dec 2021 15:30:22 +1100 Subject: [PATCH] Add deprecated warning for `select_taxa` (#112) --- NAMESPACE | 1 + R/deprecated_functions.R | 15 +++++++++++++++ man/deprecated.Rd | 7 +++++++ 3 files changed, 23 insertions(+) diff --git a/NAMESPACE b/NAMESPACE index 1a523b29..e1defb46 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -32,6 +32,7 @@ export(search_taxa) export(select_columns) export(select_filters) export(select_locations) +export(select_taxa) export(show_all_atlases) export(show_all_cached_files) export(show_all_profiles) diff --git a/R/deprecated_functions.R b/R/deprecated_functions.R index aa90ac24..6794af72 100644 --- a/R/deprecated_functions.R +++ b/R/deprecated_functions.R @@ -1,5 +1,20 @@ #' Deprecated functions #' +#' @description +#' `r lifecycle::badge("deprecated")` +#' +#' Use [search_taxa()] instead of `select_taxa()`. +#' +#' @export +#' @name deprecated +select_taxa <- function(query, is_id = FALSE) { + lifecycle::deprecate_warn("2.0.0", "select_taxa()", "search_taxa()") + + search_taxa.default( + query = query, + is_id = {if(missing(is_id)){FALSE}else{is_id}}) +} + #' @description #' `r lifecycle::badge("deprecated")` #' diff --git a/man/deprecated.Rd b/man/deprecated.Rd index 0bf379b7..a56a7bce 100644 --- a/man/deprecated.Rd +++ b/man/deprecated.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/deprecated_functions.R \name{deprecated} \alias{deprecated} +\alias{select_taxa} \alias{select_columns} \alias{select_filters} \alias{select_locations} @@ -13,6 +14,8 @@ \alias{ala_citation} \title{Deprecated functions} \usage{ +select_taxa(query, is_id = FALSE) + select_columns(..., group) select_filters(..., profile = NULL) @@ -61,6 +64,10 @@ ala_citation(data) \description{ `r lifecycle::badge("deprecated")` +Use [search_taxa()] instead of `select_taxa()`. + +`r lifecycle::badge("deprecated")` + Use [galah_select()] instead of `select_columns()`. Use [galah_filter()] instead of `select_filters()`.