Skip to content

Commit

Permalink
Merge pull request #257 from tidymodels/deprecate-gather-more
Browse files Browse the repository at this point in the history
Escalate deprecation for `gather.rset`
  • Loading branch information
juliasilge authored Sep 21, 2021
2 parents 46e5390 + 3dff344 commit 45ede5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

* Added `validation_time_split()` for a single validation sample taking the first samples for training (@mine-cetinkaya-rundel, #256).

* Escalated the deprecation of the `gather()` method for `rset` objects to a hard deprecation. Use `tidyr::pivot_longer()` instead (#257).

# rsample 0.1.0

* Fixed how `mc_cv()`, `initial_split()`, and `validation_split()` use the `prop` argument to first compute the assessment indices, rather than the analysis indices. This is a minor but **breaking change** in some situations; the previous implementation could cause an inconsistency in the sizes of the generated analysis and assessment sets when compared to how `prop` is documented to function (#217, @issactoast).
Expand Down
2 changes: 1 addition & 1 deletion R/gather.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
gather.rset <- function(data, key = NULL, value = NULL, ..., na.rm = TRUE,
convert = FALSE, factor_key = TRUE) {

lifecycle::deprecate_warn("0.1.0", "gather.rset()", "tidyr::pivot_longer()")
lifecycle::deprecate_stop("0.1.0", "gather.rset()", "tidyr::pivot_longer()")

if (any(names(data) == "splits")) {
data <- data %>% dplyr::select(-splits)
Expand Down

0 comments on commit 45ede5a

Please sign in to comment.