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