Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

samp.between

Shuffles a sequence among groups defined by the input vector


Description

Used to generate a permutation of a sequence 1:length(lev). blocks of observations are permutted, according to the vector lev passed to the function.

Usage

samp.between(lev)

Arguments

lev

a vector containing the groups to be permuted.

Value

a vector 1:length(lev) (with blocks defined by data) randomly permuted. Usually, one passes the result to reorder observations in a data set in order to carry out permutation-based tests

Author(s)

Jerome Goudet, DEE, UNIL, CH-1015 Lausanne Switzerland

References

Goudet J. (2005). Hierfstat, a package for R to compute and test variance components and F-statistics. Molecular Ecology Notes. 5:184-186

See Also

Examples

samp.between(rep(1:4,each=4))
#for an application see example in g.stats.glob

hierfstat

Estimation and Tests of Hierarchical F-Statistics

v0.5-10
GPL (>= 2)
Authors
Jerome Goudet [aut, cre], Thibaut Jombart [aut], Zhian N. Kamvar [ctb], Eric Archer [ctb], Olivier Hardy [ctb]
Initial release
2021-11-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.