View source: R/genetic_diversity.R
genetic_diversity | R Documentation |
This function is the main one used for estimating genetic diversity among strata. Given the large number of genetic diversity metrics, not all potential types are included.
genetic_diversity(
x,
stratum = NULL,
loci = NULL,
mode = c("A", "Ae", "A95", "He", "Ho", "Hi", "Hos", "Hes", "Fis", "Pe")[2],
small.N = FALSE,
...
)
x |
A |
stratum |
The strata by which the genetic distances are estimated. This can be an optional parameter when estimating distance measures calculated among individuals (default='Population'). |
loci |
The set of loci to use (default NULL will use all) |
mode |
The particular genetic diversity metric that you are going to use.
The
|
small.N |
Apply small N correction |
... |
Other parameters |
A data.frame
with columns for strata, diversity (mode), and potentially P(mode=0).
Rodney J. Dyer rjdyer@vcu.edu
AA <- locus( c("A","A") )
AB <- locus( c("A","B") )
BB <- locus( c("B","B") )
locus <- c(AA,AA,AA,AA,BB,BB,BB,AB,AB,AA)
locus2 <- c(AB,BB,AA,BB,BB,AB,AB,AA,AA,BB)
Population <- c(rep("Pop-A",5),rep("Pop-B",5))
df <- data.frame( Population, TPI=locus, PGM=locus2 )
genetic_diversity( df, mode="Ae")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.