Learn R Programming

strataG (version 2.4.905)

sharedLoci: Shared Loci

Description

Calculate proportion of alleles and number of loci shared between pairs of individuals or strata.

Usage

propSharedLoci(g, type = c("strata", "ids"))

sharedAlleles(g, smry = c("num", "which"))

Arguments

g

a '>gtypes object.

type

a character vector determining type of pairwise comparsion. Can be "strata" for strata or "ids" for individuals.

smry

a character vector determining type of summary for sharedAlleles. "which" returns the names of the alleles shared. "num" returns the number of alleles shared.

Value

data.frame summary of pairwise shared loci.

Examples

Run this code
# NOT RUN {
data(msats.g)
msats.g <- stratify(msats.g, "fine")

sharedAlleles(msats.g)

# }
# NOT RUN {
propSharedLoci(msats.g)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab