Learn R Programming

TopKLists (version 1.0.2)

geo.mean: Calculate the geometric mean

Description

Calculate the geometric mean

Usage

geo.mean(x, na.rm = TRUE)

Arguments

x
A vector of values
na.rm
Whether missing values should be automatically removed from calculation

Value

  • The geometric mean

References

Lin, S. (2010) Space oriented rank-based data integration. Statistical Applications in Genetics and Molecular Biology 9, Article 20.

See Also

Borda

Examples

Run this code
set.seed(122)
vals <- sample(1:100, 10)
geo.mean(vals)

Run the code above in your browser using DataLab