Learn R Programming

strataG (version 1.0.3)

summarizeLoci: Locus Summaries

Description

Compile standard by-locus summaries.

Usage

summarizeLoci(g, by.strata = FALSE, ...)

Arguments

g
a gtypes object.
by.strata
logical. If TRUE, return a list of summary matrices for each stratum.
...
arguments to be passed on to summary functions.

Value

  • A matrix with rows for each locus and columns containing summaries of: ll{ num.genotyped The number of samples genotyped. prop.genotyped The proportion of samples genotyped. num.alleles The number of alleles in the locus. allelic.richness The allelic richness of the locus. prop.unique.alleles Proportion of alleles found in a single sample. expt.heterozygosity Expected heterozygosity. obsvd.heterozygosity Observed heterozygosity. }

Examples

Run this code
data(msats.g)
msats.g <- stratify(msats.g, "fine")

summarizeLoci(msats.g)

Run the code above in your browser using DataLab