geomean1: Geometric Mean Plus-Minus 1

View source: R/average.R

geomean1R Documentation

Geometric Mean Plus-Minus 1

Description

Calculates the geometric mean by adding 1 before logging and subtracting 1 before exponentiating so that provides results even with zero counts. Not used by any wqbc functions but provided as may be helpful if averaging bacterial counts.

Usage

geomean1(x, na.rm = FALSE)

Arguments

x

A numeric vector of non-negative numbers.

na.rm

A flag indicating whether to remove missing values.

Examples

mean(0:9)
geomean1(0:9)

bcgov/wqbc documentation built on Feb. 11, 2023, 11:15 p.m.