From d66bd4aa0bf9c4d9b8793a4e308c9e80691b440f Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Sun, 12 Nov 2023 21:40:01 +0100 Subject: Enable links to source, upgrade to bootstrap 5 --- docs/reference/geomean.html | 213 ++++++++++++++++---------------------------- 1 file changed, 77 insertions(+), 136 deletions(-) (limited to 'docs/reference/geomean.html') diff --git a/docs/reference/geomean.html b/docs/reference/geomean.html index 34befc3..20ee17d 100644 --- a/docs/reference/geomean.html +++ b/docs/reference/geomean.html @@ -1,174 +1,115 @@ - - - - - - - -Calculate the geometric mean — geomean • pfm - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +If at least one element of the vector is 0, it returns 0.">Calculate the geometric mean — geomean • pfm + Skip to contents + +
+
+
-
+

Based on some posts in a thread on Stackoverflow -http://stackoverflow.com/questions/2602583/geometric-mean-is-there-a-built-in +http://stackoverflow.com/questions/2602583/geometric-mean-is-there-a-built-in This function returns NA if NA values are present and na.rm = FALSE (default). If negative values are present, it gives an error message. If at least one element of the vector is 0, it returns 0.

-
geomean(x, na.rm = FALSE)
+
+

Usage

+
geomean(x, na.rm = FALSE)
+
+ +
+

Arguments

+
x
+

Vector of numbers

-

Arguments

- - - - - - - - - - -
x

Vector of numbers

na.rm

Should NA values be omitted?

-

Value

+
na.rm
+

Should NA values be omitted?

-

The geometric mean

+
+
+

Value

+ -

Examples

-
geomean(c(1, 3, 9))
#> [1] 3
geomean(c(1, 3, NA, 9))
#> [1] NA
if (FALSE) geomean(c(1, -3, 9)) # returns an error
-
- +
+

Author

Johannes Ranke

-
-
+
+ +
+

Examples

+
geomean(c(1, 3, 9))
+#> [1] 3
+geomean(c(1, 3, NA, 9))
+#> [1] NA
+if (FALSE) geomean(c(1, -3, 9)) # returns an error
+
+
+
- + - - - + -- cgit v1.2.1