Skip to content

Commit 8c80ce0

Browse files
committed
changed name of legacy load_data_package to load_data_package_deprecated; add deprecation badges and warnings.
1 parent 3508398 commit 8c80ce0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

R/load_data_package.R

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#' Read contents of data package and constructs a list of tibbles based on the data file(s)
22
#'
3-
#' @description \code{load_data_package} reads the data file(s) from a package and loads it into a list of tibbles. Current implementation only supports .csv data files.
3+
#' `r lifecycle::badge("deprecated")`
4+
#' @description `load_data_package_deprecated()` reads the data file(s) from a package and loads it into a list of tibbles. Current implementation only supports .csv data files.
45
#'
56
#' @param reference_id is a 6-7 digit number corresponding to the reference ID of the data package.
67
#'
@@ -12,9 +13,13 @@
1213
#' \dontrun{
1314
#' load_data_package(2272461)
1415
#' }
15-
load_data_package <- function(reference_id) {
16+
load_data_package_deprecated <- function(reference_id) {
1617
data_package_directory <- paste("data/", reference_id, sep = "")
1718
data_package_filename <- paste(data_package_directory, ".zip", sep = "")
19+
20+
lifecycle::deprecate_warn("0.3.2",
21+
"load_data_pacakge_deprecated()",
22+
"load_data_packages()")
1823

1924
# Look for the zipped data package and attempt to unzip it. If the zipped file exists but cannot be unzipped, give the user a warning. If neither the unzipped nor zipped data packages exist, suggest the user check their working directory or use getDataPackage() to get the data package.
2025
if (!file.exists(data_package_directory)) {

0 commit comments

Comments
 (0)