Learn R Programming

TopKLists (version 1.0.8)

geo.mean: Calculate the geometric mean

Description

Calculate the geometric mean

Usage

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

Value

The geometric mean

Arguments

x

A vector of values

na.rm

Whether missing values should be automatically removed from calculation

Author

Shili Lin <shili@stat.osu.edu>

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