genotype_frequencies: Genotype Frequencies

View source: R/genotype_frequencies.R

genotype_frequenciesR Documentation

Genotype Frequencies

Description

Provides a summary of genotype frequencies (observed and expected) from a vector of locus objects.

Usage

genotype_frequencies(x, supress_warnings = FALSE)

Arguments

x

An object of type locus

supress_warnings

A flag that will prevent warnings in output for ease in simulation without loosing materials in the 50 warnings()

Value

A data.frame with genotype, observed, and expected as counts.

Author(s)

Rodney J. Dyer rjdyer@vcu.edu

Examples

  freqs <- c(0.55, 0.30, 0.15)
  alleles <- c(LETTERS[1:3])
  f <- data.frame(Locus="PGM", Allele=alleles, Frequency=freqs)
  data <- make_population(f,N=20)
  table(data$PGM)
  genotype_frequencies( data$PGM )

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