geomMean: Geometric Mean

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/geomMean.R

Description

Computation of the geometric mean.

Usage

1
geomMean(x, na.rm = TRUE)

Arguments

x

numeric vector of non-negative Reals

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

Details

The computation of the geometric mean is done via prod(x)^(1/length(x)).

Value

geometric mean

Note

A first version of this function appeared in package SLqPCR.

Author(s)

Matthias Kohl Matthias.Kohl@stamats.de

References

Perkins, JR, Dawes, JM, McMahon, SB, Bennett, DL, Orengo, C, Kohl, M (2012). ReadqPCR and NormqPCR: R packages for the reading, quality checking and normalisation of RT-qPCR quantification cycle (Cq) data. BMC Genomics, 13, 1:296.

Examples

1
2
x <- rlnorm(100)
geomMean(x)

Example output

Loading required package: RColorBrewer
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colMeans, colSums, colnames,
    dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
    intersect, is.unsorted, lapply, lengths, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
    rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which, which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: ReadqPCR
Loading required package: affy
Loading required package: qpcR
Loading required package: MASS
Loading required package: minpack.lm
Loading required package: rgl
Loading required package: robustbase

Attaching package: 'robustbase'

The following object is masked from 'package:Biobase':

    rowMedians

Loading required package: Matrix
Warning messages:
1: In read.dcf(con) :
  URL 'http://bioconductor.org/BiocInstaller.dcf': status was 'Couldn't resolve host name'
2: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
3: 'rgl_init' failed, running with rgl.useNULL = TRUE 
4: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 
[1] 1.017437

NormqPCR documentation built on Nov. 8, 2020, 6:37 p.m.