Skip to content

Commit

Permalink
Escalate deprecation for gather.rset
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasilge committed Sep 20, 2021
1 parent 6e8eabc commit 3dff344
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 @@ -4,6 +4,8 @@

* Change `make_splits()` to an S3 generic, with the original functionality a method for `list` and a new method for dataframes that allows users to create a split from existing analysis & assessment sets (@LiamBlake, #246).

* 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 3dff344

Please sign in to comment.