geometricMean: Geometric mean

geometricMeanR Documentation

Geometric mean

Description

The geometric mean is the nth root of n products or e to the mean log of x.

Usage

geometricMean(x, ...)

## S4 method for signature 'sparseMatrix'
geometricMean(x, MARGIN = 2L)

Arguments

x

Object.

MARGIN

integer(1-2). Dimension where the function will be applied. For a two-dimensional matrix: 1 indicates rows; 2 indicates columns; c(1, 2) indicates rows and columns.

...

Additional arguments.

Details

Useful for describing non-normal (i.e. geometric) distributions.

Value

numeric.

Note

Updated 2022-10-24.

Examples

data(sparseMatrix, package = "AcidTest")

## Matrix ====
x <- sparseMatrix
geometricMean(x)

acidgenomics/r-acidsinglecell documentation built on March 30, 2024, 5:39 a.m.