ds.geometricMean: Geometric Mean

Description Usage Arguments Details Value Dependencies Author(s) Examples

Description

Computes the geometric mean for a given study variable.

Usage

1
2
ds.geometricMean(x = NULL, naRm = TRUE, zero.propagate = FALSE,
  datasources = NULL)

Arguments

x

a character, the name of study variable.

naRm

a boolean, if TRUE (default) remove the missing values during the computation on the server side; if FALSE does not remove the missing values.

zero.propagate

a boolean, if TRUE (default) remove all zeros during the computation on the server side; if FALSE does not remove the zero values.

datasources

a list of opal object(s) obtained after login in to opal servers; these objects hold also the data assign to R, as data frame, from opal datasources.

Details

Formally the geometric mean is the in root of the n numbers products, or exp to the mean log of x. Each data node computes the sum of logs, and the central node computes the arithmetic mean and its exponentiation.

Value

return a numeric value.

Dependencies

getGm, getLength

Author(s)

Paula Raissa Costa e Silva

Examples

1
2
3
{
gm <- ds.geometricMean('D$birth_weight')
}

paularaissa/distStatsClient documentation built on June 19, 2019, 12:43 a.m.