Learn R Programming

strataG (version 2.0.2)

alleleFreqFormat: Compiles and Formats Allele Frequencies

Description

Format allele frequencies to for a set of ids and loci

Usage

alleleFreqFormat(x, g)

Arguments

x

a matrix or data.frame where first column is sample id and second colum is locus name.

g

a '>gtypes object.

Value

matrix of original samples, loci, and a formatted character string giving alleles and their overall frequencies in the data.

See Also

alleleFreqs

Examples

Run this code
# NOT RUN {
data(msats.g)

x <- cbind(
 id = sample(indNames(msats.g), 10, rep = TRUE),
 locus = sample(locNames(msats.g), 10, rep = TRUE)
)
alleleFreqFormat(x, msats.g)

# }

Run the code above in your browser using DataLab