Skip to contents

Calculate geometric mean of a numeric vector.

Usage

geomean(x, na.rm = FALSE, trim = 0)

Arguments

x

Numeric array

na.rm

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

trim

the fraction (0 to 0.5) of observations to be trimmed from each end of x before the mean is computed. Values of trim outside that range are taken as the nearest endpoint.

Value

Geometric mean ofx