Hi | R Documentation |
Estimate Individual Heterozygosity
Returns the heterozygosity of loci within each individual. This is a per-individual estiamte
Hi(x)
x |
A |
The average heterozygosity for non-missing loci per individual as a data.frame
object with all non-locus columns identical to those passed.
This function must be called on a data.frame
of individuals, it will assume that
each row contains at least one column of type locus
Rodney J. Dyer rjdyer@vcu.edu
loc1 <- c( locus( c("A","A") ), locus( c("A","B") ), locus( c("A","B") ) )
loc2 <- c( locus( c("A","B") ), locus( c("A","A") ), locus( c("A","B") ) )
loc3 <- c( locus( c("A","B") ), locus( c("A","A") ), locus( c("A","B") ) )
loc4 <- c( locus( c("A","A") ), locus( c("A","A") ), NA )
pop <- c("A","A","B")
df <- data.frame( ID = 1:3, pop, loc1, loc2, loc3, loc4 )
Hi( df )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.