rrDiv: Random Replicate Division

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Specify random replicate division parameters for data division

Usage

1
rrDiv(nrows = NULL, seed = NULL)

Arguments

nrows

number of rows each subset should have

seed

the random seed to use (experimental)

Details

The random replicate division method currently gets the total number of rows of the input data and divides it by nrows to get the number of subsets. Then it randomly assigns each row of the input data to one of the subsets, resulting in subsets with approximately nrows rows. A future implementation will make each subset have exactly nrows rows.

Value

a list to be used for the "by" argument to divide

Author(s)

Ryan Hafen

References

See Also

divide, recombine, condDiv

Examples

1
2
3
4
5
# divide iris data into random subsets with ~20 records per subset
irisRR <- divide(iris, by = rrDiv(20), update = TRUE)
irisRR
# look at the actual distribution of number of rows per subset
plot(splitRowDistn(irisRR))

datadr documentation built on May 1, 2019, 8:06 p.m.