add_resample_id | R Documentation |
For a data set, add_resample_id()
will add at least one new column that
identifies which resample that the data came from. In most cases, a single
column is added but for some resampling methods, two or more are added.
add_resample_id(.data, split, dots = FALSE)
.data |
A data frame |
split |
A single |
dots |
A single logical: should the id columns be prefixed with a "."
to avoid name conflicts with |
An updated data frame.
labels.rsplit
library(dplyr)
set.seed(363)
car_folds <- vfold_cv(mtcars, repeats = 3)
analysis(car_folds$splits[[1]]) %>%
add_resample_id(car_folds$splits[[1]]) %>%
head()
car_bt <- bootstraps(mtcars)
analysis(car_bt$splits[[1]]) %>%
add_resample_id(car_bt$splits[[1]]) %>%
head()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.