make_loci: Make loci

Description Usage Arguments Value Author(s) Examples

View source: R/make_loci.R

Description

This function makes a vector of locus objects given a frequency array and an estimate of the inbreeding frequency. Given that it is not possible to 'perfectly' make the right distribution of genotypes for all given N & F combinations, this will work to provide as close of an approximation as possible.

Usage

1
make_loci(x, N = 20, F = 0)

Arguments

x

A data.frame with Allele and Frequency columns. The Locus column specifies the names of the alleles to be used and the Frequency one gives their occurrence.

N

The number of loci to return (default=20)

F

A numeric value for the inbeeding statistic (default=0)

Value

A vector of locus objects.

Author(s)

Rodney J. Dyer rjdyer@vcu.edu

Examples

1
2
3
 x <- data.frame(Allele=c("A","B"), Frequency=c(0.5,0.5))
 make_loci(x)
 make_loci(x,F=1)

MarianaLag/Mlag documentation built on Feb. 13, 2020, 12:30 a.m.