Description Usage Arguments Value Examples
Randomly permutes individuals between sample groups and calculates difference in gene diversity (Hs) between the two randomised groups. Used to generate null distribution of difference in gene diversity between two samples for permutation testing
1 | shuff_data(data, reps = 100, bal.loci = TRUE)
|
reps |
Number of iterations to repeat the permutation. If not specified, defaults to 100. |
bal.loci |
Option to incorporate balancing of per-locus sample size into the permutation (see function bal_loci). When bal.loci = TRUE, each replicate of the permutation first balances sample sizes before gene diversity calculation is performed. When bal.loci = FALSE, sample balancing is skipped. |
A vector of values of length "reps". Each value represents the difference in gene diversity between two populations after individuals have been randomly permuted between the populations. This difference is calculated as Hs(pop2) - Hs(pop1).
1 | test <- shuff_data(data = dat.sim, reps = 100, bal.loci = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.