replicate: Replicate each row of a resamples object

View source: R/replicate.R

replicateR Documentation

Replicate each row of a resamples object

Description

This is useful to test the replicability of a modelling pipeline or to prepare for permutations.

Usage

replicate(object, n)

Arguments

object

of class resamples, created by a ⁠resample_***()⁠ function.

n

number of times to replicate

Value

The input object with each row replicated n times and a new column replic giving the replicate number.

Examples

rs <- resample_split(mtcars, p=0.7)
replicate(rs, n=5)
rs <- resample_cv(mtcars, k=3, n=2)
replicate(rs, n=3)

jiho/joml documentation built on Dec. 6, 2023, 5:50 a.m.