From 3a579d87820ccbec514f1be5eb090e874fd87eec Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 22 Dec 2015 19:32:54 +0100 Subject: EFSA 2015 tier 1 PEC soil, clean up, add static docs --- pkg/inst/web/geomean.html | 121 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 pkg/inst/web/geomean.html (limited to 'pkg/inst/web/geomean.html') diff --git a/pkg/inst/web/geomean.html b/pkg/inst/web/geomean.html new file mode 100644 index 0000000..fb859fa --- /dev/null +++ b/pkg/inst/web/geomean.html @@ -0,0 +1,121 @@ + + + + +geomean. pfm 0.3-1 + + + + + + + + + + + + + + + + + +
+
+ +
+ +

Calculate the geometric mean

+ +
+
+

Usage

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

Arguments

+
+
x
+
Vector of numbers
+
na.rm
+
Should NA values be omitted?
+
+ +
+

Value

+ +

+The geometric mean +

+ +
+ +
+

Description

+ +

Based on some posts in a thread on Stackoverflow +http://stackoverflow.com/questions/2602583/geometric-mean-is-there-a-built-in +This function checks for negative values, removes NA values per default and +returns 0 if at least one element of the vector is 0.

+ +
+ +

Examples

+
geomean(c(1, 3, 9)) +
+
[1] 3 +
+
geomean(c(1, 3, NA, 9)) +
+
[1] 3 +
+
## Not run: geomean(c(1, -3, 9)) # returns an error +
+
+
+ + + +

Author

+ +Johannes Ranke + + +
+
+ + +
+ + \ No newline at end of file -- cgit v1.2.1