diff --git a/NEWS.md b/NEWS.md index 7a1a99f9..7ad35335 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,9 @@ * 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). +* Fixed problem with creation of `apparent()` samples (#223). + + # rsample 0.0.9 * New `rset_reconstruct()`, a developer tool to ease creation of new rset subclasses (#210). diff --git a/R/apparent.R b/R/apparent.R index 192a5178..49db121e 100644 --- a/R/apparent.R +++ b/R/apparent.R @@ -22,11 +22,10 @@ apparent <- function(data, ...) { class(splits) <- c("rsplit", "apparent_split") split_objs <- tibble::tibble(splits = list(splits), id = "Apparent") - split_objs <- - add_class(split_objs, - cls = c("apparent", "rset")) - - split_objs + new_rset(splits = split_objs$splits, + ids = split_objs$id, + attrib = NULL, + subclass = c("apparent", "rset")) } #' @export