permute_ab | R Documentation |
minimal code & dependency-free. Not computationally efficient, but this is negligible for our use-cases
permute_ab(x, nmax = 100)
x |
integer vector of (1,2) group IDs, at least two of each |
nmax |
maximum number of permuted sets |
permute_ab(as.integer(c(1,1,1, 2,2,2))) # most basic permute_ab(as.integer(c(1,1,1,1, 2,2,2,2,2))) # uneven groups
integer matrix where rows are permutations and columns are indices in input x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.