Description Usage Arguments Value Author(s) Examples
View source: R/alleles2genotypes.R
A function that will return a data frame in genotype per column format from a data frame in allele per column format.
1 | alleles2genotypes(df, allele_cols, allelesAsIntegers = TRUE)
|
df |
Data frame that contains genotypic data and metadata |
allele_cols |
Numeric column identifiers of loci |
allelesAsIntegers |
For alleles with zeros use FALSE. If FALSE this will eliminate the loss of leading zeros, but will not be usable in 'hierfstat'. When TRUE the genotypes are converted to integers for 'hierfstat' package. |
Data frame in genotype per column format
Zak Robinson, Contact: zachary.robinson(at)umontana.com
1 2 3 | data("wgp_example_2col")
genotypes<-alleles2genotypes(df=wgp_example_2col,allele_cols = 3:ncol(wgp_example_2col),
allelesAsIntegers=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.