to_mv_freq | R Documentation |
This function takes a data.frame
of data and returns
a matrix of allele frequencies where each row is a stratum
and each column is an allele frequency (all lumped together).
to_mv_freq(x, stratum = "Population", drop.allele = FALSE)
x |
A |
stratum |
The stratum to use to partition the data (default "Population") |
drop.allele |
A flag (default |
A matrix with as many rows as strata and columns as alleles across all loci.
Rodney J. Dyer rjdyer@vcu.edu
AA <- locus( c("A","A") )
AB <- locus( c("A","B") )
AC <- locus( c("A","C") )
BB <- locus( c("B","B") )
BC <- locus( c("B","C") )
CC <- locus( c("C","C") )
loci <- c(AA,AA,AB,AA,BB,BC,CC,BB,BB,CC)
df <- data.frame( Population=c(rep("A",5),rep("B",5) ), TPI=loci )
to_mv_freq(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.