GeomMean: Calculate geometric mean with NAs removed

View source: R/GeomMean_HarmMean.R

GeomMeanR Documentation

Calculate geometric mean with NAs removed

Description

Function to calculate geometric mean with NAs removed.

Usage

GeomMean(x, verbose = FALSE)

Arguments

x
  • vector

verbose
  • flag to print diagnostic info

Details

If x has any 0's, then 0 is returned. Otherwise exp((mean(log(x),na.rm=TRUE))).

Value

a numeric value.


wStockhausen/wtsUtilities documentation built on March 16, 2024, 10:38 a.m.