Learn R Programming

poppr (version 1.1.5)

private_alleles: Tabulate alleles the occur in only one population.

Description

Tabulate alleles the occur in only one population.

Usage

private_alleles(gid, report = "table", level = "population")

Arguments

gid
a genind or genclone object.
report
one of "table", "vector", or "data.frame". Tables (Default) and data frame will report counts along with populations or individuals. Vectors will simply report which populations or individuals contain private alleles. Table
level
one of "population" (Default) or "individual".

Value

  • a matrix, data.frame, or vector defining the populations or individuals containing private alleles. If vector is chosen, alleles are not defined.

Examples

Run this code
data(Pinf) # Load P. infestans data.
setpop(Pinf) <- ~Country # Set the population to be at the country level
private_alleles(Pinf)
# An example of how this data can be displayed.
library("ggplot2")
Pinfpriv <- private_alleles(Pinf, report = "data.frame")
ggplot(Pinfpriv) + geom_tile(aes(x = population, y = allele, fill = count))

Run the code above in your browser using DataLab