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 March 16, 2024, 10:38 a.m.