HarmMean: Calculate harmonic mean with NAs removed

View source: R/GeomMean_HarmMean.R

HarmMeanR Documentation

Calculate harmonic mean with NAs removed

Description

Function to calculate harmonic mean with NAs removed.

Usage

HarmMean(x, verbose = FALSE)

Arguments

x
  • vector

verbose
  • flag to print diagnostic info

Details

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

Value

a numeric value.


wStockhausen/wtsUtilities documentation built on Feb. 3, 2025, 6:29 a.m.