From 12a31f4c130c551f82232d9ef7dfb608bd52c53f Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 27 Sep 2016 23:00:48 +0200 Subject: Reorganise repository using standard package layout --- docs/geomean.html | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 docs/geomean.html (limited to 'docs/geomean.html') diff --git a/docs/geomean.html b/docs/geomean.html new file mode 100644 index 0000000..3530c32 --- /dev/null +++ b/docs/geomean.html @@ -0,0 +1,121 @@ + + + + +geomean. pfm 0.3-8 + + + + + + + + + + + + + + + + + + +
+
+ +
+ +

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
+
+ +
+ + +
+ + \ No newline at end of file -- cgit v1.2.1