Learn R Programming

graph4lg (version 1.8.0)

harm_mean: Compute the harmonic mean of a numeric vector

Description

The function computes the harmonic mean of a numeric vector

Usage

harm_mean(x)

Value

A numeric value corresponding to the harmonic mean of the vector

Arguments

x

A numeric vector

Author

P. Savary

Examples

Run this code
x <- c(10, 2, 5, 15)
hm <- harm_mean(x)

Run the code above in your browser using DataLab