Description Usage Arguments Value Note Author(s) Examples
Calculate allele frequencies or proportions for each locus.
1 | alleleFreqs(g, by.strata = FALSE, type = c("freq", "prop"))
|
g |
a gtypes object. |
by.strata |
logical determining if results should be returned by strata? |
type |
return counts ( |
A list of allele frequencies for each locus. Each element is a
vector (by.strata = FALSE
) or matrix (by.strata = TRUE
)
with the frequency or proportion of each allele.
If g
is a haploid object with sequences, the function will run
labelHaplotypes
if sequences aren't already grouped by
haplotype. The gtypes
object used with haplotype assignments and
unassigned individuals will be stored in attr(*, "gtypes")
.
Eric Archer eric.archer@noaa.gov
1 2 3 4 5 6 7 | data(msats.g)
f <- alleleFreqs(msats.g)
f$D11t # Frequencies for Locus D11t
f.pop <- alleleFreqs(msats.g, TRUE, "prop")
f.pop$EV94[, "Coastal"] # Proportions of EV94 alleles in the Coastal population
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.