Function to coerce a resampling object to a data frame.
Usage
# S3 method for resampling
as.data.frame(x, ..., stringsAsFactors = FALSE)Arguments
- x
an object of class
resampling- ...
additional arguments to
data.frame- stringsAsFactors
logical: should character vectors be converted to factors? The ‘factory-fresh’ default has been
TRUEpreviously but has been changed toFALSEfor R 4.0.0.
Examples
#resampling object
x = resampling(
method = 'rswor',
N = 10,
samples = list(c(1,5,7), c(6,2,9))
)
#print
as.data.frame(x)
#> sampleNumber sample sampleSize holdoutSize
#> 1 1 1, 5, 7 3 7
#> 2 2 6, 2, 9 3 7