Skip to content

Commit

Permalink
depreceta datanames in teal.data::get_code
Browse files Browse the repository at this point in the history
  • Loading branch information
m7pr committed Oct 16, 2024
1 parent 8c99ab6 commit e4187e5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# teal.data 0.6.0.9012

### Deprecations

- `get_code(datanames)` `S4` method parameter for `teal_data()` object was soft deprecated. Use `get_code(names)`.


### Enhancements

- `datanames()`
Expand Down
3 changes: 2 additions & 1 deletion R/teal_data-get_code.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Get code from `teal_data` object
#'
#' Retrieve code from `teal_data` object.
#' `r lifecycle::badge("deprecated")` Retrieve code from `teal_data` object.
#'
#' Retrieve code stored in `@code`, which (in principle) can be used to recreate all objects found in `@env`.
#' Use `datanames` to limit the code to one or more of the datasets enumerated in `@datanames`.
Expand Down Expand Up @@ -108,6 +108,7 @@ setMethod("get_code", signature = "teal_data", definition = function(object, dep
checkmate::assert_flag(deparse)

code <- if (!is.null(datanames)) {
warning("get_code(datanames) was deprecated in teal.data 0.6.1, use get_code(names) instead.")
get_code_dependency(object@code, datanames, ...)
} else {
object@code
Expand Down
2 changes: 1 addition & 1 deletion man/get_code.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e4187e5

Please sign in to comment.