File: populate.Rd

package info (click to toggle)
r-cran-rsample 1.1.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,872 kB
  • sloc: sh: 13; makefile: 2
file content (33 lines) | stat: -rw-r--r-- 750 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/complement.R
\name{populate}
\alias{populate}
\title{Add Assessment Indices}
\usage{
populate(x, ...)
}
\arguments{
\item{x}{A \code{rsplit} and \code{rset} object.}

\item{...}{Not currently used}
}
\value{
An object of the same kind with the integer indices.
}
\description{
Many \code{rsplit} and \code{rset} objects do not contain indicators for
the assessment samples. \code{populate()} can be used to fill the slot
for the appropriate indices.
}
\examples{
set.seed(28432)
fold_rs <- vfold_cv(mtcars)

fold_rs$splits[[1]]$out_id
complement(fold_rs$splits[[1]])

populate(fold_rs$splits[[1]])$out_id

fold_rs_all <- populate(fold_rs)
fold_rs_all$splits[[1]]$out_id
}