The geometric mean is the nth root of n products or e to the mean log of x
.
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.
Examples
data(sparseMatrix, package = "AcidTest")
## Matrix ====
x <- sparseMatrix
geometricMean(x)
#> sample01 sample02 sample03 sample04 sample05 sample06 sample07 sample08
#> 1.000000 1.275373 1.000000 1.000000 1.000000 1.463111 1.516683 1.559583
#> sample09 sample10
#> 2.219076 1.626577