Skip to content

Commit

Permalink
remove lifecycle warning
Browse files Browse the repository at this point in the history
  • Loading branch information
PietrH committed Sep 4, 2023
1 parent 511598e commit 6c6ad32
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
12 changes: 3 additions & 9 deletions R/get_rai.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ get_rai <- function(package = NULL,
sex = NULL,
life_stage = NULL) {
# check camera trap data package
check_package(package, datapkg, "get_rai")
check_package(package)

get_rai_primitive(package, ...,
use = "n_obs",
Expand Down Expand Up @@ -88,8 +88,6 @@ get_rai <- function(package = NULL,
#' on, e.g. `"adult"` or `c("subadult", "adult")`.
#' If `NULL` (default) all observations of all life stage classes are taken
#' into account.
#' @param datapkg Deprecated.
#' Use `package` instead.
#' @param ... Filter predicates for filtering on deployments.
#' @return A tibble data frame with the following columns:
#' - `deploymentID`: Deployment unique identifier.
Expand Down Expand Up @@ -130,13 +128,9 @@ get_rai_individuals <- function(package = NULL,
...,
species = "all",
sex = NULL,
life_stage = NULL,
datapkg = lifecycle::deprecated()) {
life_stage = NULL) {
# check camera trap data package
check_package(package, datapkg, "get_rai_individuals")
if (is.null(package) & !is.name(datapkg)) {
package <- datapkg
}
check_package(package)

get_rai_primitive(package, ...,
use = "n_individuals",
Expand Down
2 changes: 1 addition & 1 deletion R/get_record_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ get_record_table <- function(package = NULL,
deltaTimeComparedTo = NULL,
removeDuplicateRecords = TRUE) {
# check data package
check_package(package, datapkg, "get_record_table", media = TRUE)
check_package(package, media = TRUE)

# check stationCol is a valid column name
assertthat::assert_that(
Expand Down
2 changes: 1 addition & 1 deletion R/map_dep.R
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ map_dep <- function(package = NULL,
radius_range = c(10, 50)) {

# check camera trap data package
check_package(package, datapkg, "map_dep")
check_package(package)

# define possible feature values
features <- c(
Expand Down

0 comments on commit 6c6ad32

Please sign in to comment.