Description Usage Arguments Value Examples
This function creates a random permutation of the original group memberships for independent samples t-tests. Care is taken so that all permutations are unique.
1  | isTtestRandomGroups(obj, nperm, seed = NULL)
 | 
obj | 
 a list object returned by   | 
nperm | 
 integer indicating the number of permutations  | 
seed | 
 an integer value which specifies a seed (default: NULL), or a 
list of arguments passed to   | 
isTtestRandomGroups returns a matrix with as many rows as
the length of 'group' and as many columns as 'nperm'.
1 2 3 4 5 6 7 8 9 10 11 12 13  | ## Not run: 
# this should fail: too many permutations on a small sample
temp <- try(isTtestRandomGroups(list(groups = rep(1:2, each = 4L), 1e3)), 
            silent = TRUE)
stopifnot(inherits(temp, "try-error"))
# all permutations should be unique
temp <- isTtestRandomGroups(list(groups = rep(1:2, c(6, 4))), 500)
stopifnot(!anyDuplicated(temp, MARGIN = 2L))
temp <- isTtestRandomGroups(list(groups = rep(1:2, each = 20L)), 1e4)
stopifnot(!anyDuplicated(temp, MARGIN = 2L))
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.