Description Usage Arguments Value
View source: R/sample_partitions_by_half.R
Generate Random, Non-Overlapping Partitions of Indices with Reference vs Rest
1 | sample_partitions_by_half(n, fraction, warn = TRUE)
|
n |
Number of elements to partition. |
fraction |
A numeric of length two in (0,1/2] specifying the size of
each partition relative to |
warn |
If |
A list of two disjoint random non-overlapping partitions where each
element holds indices in {1, 2, ..., n}. The first element holds the
'reference' partition and the second the 'test' partition.
As an example, if fraction[1] == 1/2
, then the reference partition
P_0.5 holds n/2 indices and the test partition holds indices in
{1, 2, ..., n} \ P_0.5 where the size of the partitions corresponds
to the sizes specified by fraction[2]
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.