aboutsummaryrefslogtreecommitdiff
path: root/man/geomean.Rd
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2016-09-27 23:00:48 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2016-09-27 23:00:48 +0200
commit12a31f4c130c551f82232d9ef7dfb608bd52c53f (patch)
tree2525ab1ea4102a6edddbd0c2f03f4a851bf2f9c5 /man/geomean.Rd
parent0d958ab6f84b569b5437f231c56004890c4ae23b (diff)
Reorganise repository using standard package layout
Diffstat (limited to 'man/geomean.Rd')
-rw-r--r--man/geomean.Rd31
1 files changed, 31 insertions, 0 deletions
diff --git a/man/geomean.Rd b/man/geomean.Rd
new file mode 100644
index 0000000..ed82294
--- /dev/null
+++ b/man/geomean.Rd
@@ -0,0 +1,31 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/geomean.R
+\name{geomean}
+\alias{geomean}
+\title{Calculate the geometric mean}
+\usage{
+geomean(x, na.rm = TRUE)
+}
+\arguments{
+\item{x}{Vector of numbers}
+
+\item{na.rm}{Should NA values be omitted?}
+}
+\value{
+The geometric mean
+}
+\description{
+Based on some posts in a thread on Stackoverflow
+\url{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))
+geomean(c(1, 3, NA, 9))
+\dontrun{geomean(c(1, -3, 9)) # returns an error}
+}
+\author{
+Johannes Ranke
+}
+

Contact - Imprint