partition | R Documentation |
data.frame
of genetic information, into a list of substrataThis function allows you to take a single Population
object
into a list of Population
objects, one for each stratum.
partition(x, stratum = "Population")
x |
Any object that can be column indexed by the function |
stratum |
The column name of the stratum to partition on (default='Population'). |
A partitioned list of objects, indexed by name
A quick routine for grabbing subsets of data.
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)
Population <- c(rep("Pop-A",5),rep("Pop-B",5))
locus2 <- c(AB,BB,AA,BB,BB,AB,AB,AA,AA,BB)
df <- data.frame( Population, TPI=locus, PGM=locus2 )
partition(df, stratum="Population")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.