Helper Function: Calculate the Geometric Mean

geometric_mean(x, na.rm = FALSE)

Arguments

x

A numeric vector.

na.rm

A logical value indicating whether NA values should be removed.

Value

The geometric mean of the input vector.