as.data.frame.rsplit | R Documentation |
rsplit
object to a data frameThe analysis or assessment code can be returned as a data
frame (as dictated by the data
argument) using
as.data.frame.rsplit()
. analysis()
and
assessment()
are shortcuts.
## S3 method for class 'rsplit'
as.data.frame(x, row.names = NULL, optional = FALSE, data = "analysis", ...)
analysis(x, ...)
## Default S3 method:
analysis(x, ...)
## S3 method for class 'rsplit'
analysis(x, ...)
assessment(x, ...)
## Default S3 method:
assessment(x, ...)
## S3 method for class 'rsplit'
assessment(x, ...)
x |
An |
row.names |
|
optional |
A logical: should the column names of the data be checked for legality? |
data |
Either |
... |
Not currently used. |
library(dplyr)
set.seed(104)
folds <- vfold_cv(mtcars)
model_data_1 <- folds$splits[[1]] %>% analysis()
holdout_data_1 <- folds$splits[[1]] %>% assessment()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.