utils.fbm.count.mean: Means of counts, formed exactly as rowMeans() forms them

View source: R/utils.fbm.export.r

utils.fbm.count.meanR Documentation

Means of counts, formed exactly as rowMeans() forms them

Description

WARNING: UTILITY SCRIPTS ARE FOR INTERNAL USE ONLY AND SHOULD NOT BE USED BY END USERS AS THEIR USE OUT OF CONTEXT COULD LEAD TO UNPREDICTABLE OUTCOMES.

R's mean() of a logical vector, rowMeans() and colMeans() divide a long-double sum by the count. For counts added over blocks of loci, a plain num / den differs from that in the last digit for about one count in 6,000 once den exceeds 2,048. This returns, element by element, exactly the value mean() gives for num TRUE among den values, so statistics counted in blocks stay identical to those of the decoded matrix.

Usage

utils.fbm.count.mean(num, den)

Arguments

num

Numerators: whole numbers (e.g. heterozygous loci per individual) [required].

den

Denominators: whole numbers, recycled to the length of num (e.g. called loci per individual) [required].

Value

A numeric vector with the names of num; NaN where den is 0.

Author(s)

Custodian: Bernd Gruber – Post to https://groups.google.com/d/forum/dartr

See Also

Other utilities: gl.He(), gl.Ho(), gl.alf(), utils.allelic.richness(), utils.basic.stats(), utils.check.datatype(), utils.collapse.matrix(), utils.dart2genlight(), utils.dist.binary(), utils.fbm.amat(), utils.fbm.blocks(), utils.fbm.colblocks(), utils.fbm.colwise(), utils.fbm.copy(), utils.fbm.decode(), utils.fbm.grm(), utils.fbm.has(), utils.fbm.new(), utils.fbm.pair.counts(), utils.fbm.reader(), utils.fbm.rowwise(), utils.fbm.tempfile(), utils.flag.start(), utils.het.pop(), utils.history.call(), utils.is.fixed(), utils.jackknife(), utils.n.var.invariant(), utils.plot.save(), utils.read.fasta(), utils.read.ped(), utils.recalc.avgpic(), utils.recalc.callrate(), utils.recalc.freqhets(), utils.recalc.freqhomref(), utils.recalc.freqhomsnp(), utils.recalc.maf(), utils.reset.flags(), utils.transpose(), utils.vcf.depth(), utils.vcfr2genlight.polyploid()


dartR.base documentation built on Nov. 18, 2026, 9:06 a.m.