geom_frequencies: Plot allele frequencies

View source: R/geom_frequencies.R

geom_frequenciesR Documentation

Plot allele frequencies

Description

This function allows you to plot allele frequencies for several potential levels of stratum and loci.

Usage

geom_frequencies(x, ...)

Arguments

x

The data frame with allele frequencies from frequencies.

...

Ingnored but passed on to facet_grid() for optional stuff

Value

An object of type ggplot

Note

This function does a pretty good job of plotting but if you have too many loci and/or strata, you may have a difficult time getting it to look right. By default, the function does NOTHING to prevent you from making crappy plots with too many levels. To plot a reduced number of loci/strata, use a subset of your data.

Author(s)

Rodney J. Dyer rjdyer@vcu.edu

Examples

data(arapat)
freqs <- frequencies( arapat )
require(ggplot2)
ggplot() + geom_frequencies( freqs )
freqs <- frequencies( arapat, loci="EN", stratum="Cluster")
ggplot() + geom_frequencies( freqs ) + facet_grid(.~Stratum)

dyerlab/gstudio documentation built on Feb. 2, 2024, 8:24 p.m.