prepdata {hierfstat}R Documentation

Sort and renumber and recode levels for the hierarchical analysis if necessary

Description

Called by varcomp to rearrange data. Should not need to be called directly

Usage

prepdata(data)

Arguments

data takes as input the different factor from the outermost (e.g. region) to the innermost (e.g. individual). This function must be applied before transformation of genotypic to allelic data

Value

a reoredered,renumbered and sorted data frame

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

varcomp.

Examples

f1<-rep(c("B","C","A"),each=10)
f2<-rep(c("d","i","f","g","h","e"),each=5)
prepdata(data.frame(loc=f1,patch=f2,ind=1:30))

[Package hierfstat version 0.04-4 Index]