checkFreqs: Make sure that the frequencies are such

View source: R/checkFreqs.R

checkFreqsR Documentation

Make sure that the frequencies are such

Description

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

Usage

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


data(fbiCaucs)
checkFreqs(fbiCaucs)

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


relSim documentation built on Aug. 29, 2023, 9:07 a.m.