Make sure that the frequencies are such

Share:

Description

Checks whether a list of frequencies at a series of genetic loci both sum to one and lie between 0 and 1.

Usage

1
checkFreqs(Freqs)

Arguments

Freqs

A list containg elements loci and freqs. freqs is a list of vectors containing the frequencies at the given loci.

Details

If a locus fails to sum to one, or there are alleles which fall below zero or above one, then a warning message will be returned for each item in error.

Author(s)

James M. Curran

See Also

normalizeFreqs

Examples

1
2
3
4
5
6
data(fbiCaucs)
checkFreqs(fbiCaucs)

## induce an error
fbiCaucs$freqs[[1]] = runif(10)
checkFreqs(fbiCaucs)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.