gmean function

Geometric Mean

Geometric Mean

gmean(x, trim = 0, ignore_na = FALSE, ignore_zero = TRUE)

Arguments

  • x: A numeric vector.
  • trim: A length-one numeric vector specifying the fraction (0 to 0.5) of observations to be trimmed from each end of x before the mean is computed.
  • ignore_na: A logical scalar: should missing values be stripped before the computation proceeds?
  • ignore_zero: A logical scalar: should zeros be stripped before the computation proceeds?

Returns

A numeric vector.