View source: R/utils.dartR.class.def.r
| glMean | R Documentation |
Returns, for each locus, the mean of the second
(alternative) allele, ignoring missing data: with alleleAsUnit = TRUE,
its frequency among the scored allele copies. It replaces
adegenet::glMean so that FBM-backed dartR objects (see
gl.gen2fbm) are handled; other objects are passed to
adegenet::glMean and give identical results.
glMean(x, alleleAsUnit = TRUE)
x |
Name of the dartR or genlight object [required]. |
alleleAsUnit |
If TRUE, the mean is taken over allele copies; if FALSE, over individuals, each genotype divided by the individual's ploidy [default TRUE]. |
A named numeric vector with one value per locus. Loci with no data give NaN.
Author(s): Bernd Gruber. Custodian: Bernd Gruber – Post to https://groups.google.com/d/forum/dartr
head(glMean(testset.gl))
fbm.gl <- gl.gen2fbm(testset.gl, verbose = 0)
all.equal(glMean(fbm.gl), glMean(testset.gl))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.