Geometric Mean (GM)
Usage
gm(data, ...)
# S3 method for class 'data.frame'
gm(data, truth, na_rm = TRUE, ...)
gm_vec(truth, na_rm = TRUE, ...)
Arguments
- data
A
data.frame
containing the columns specified by thetruth
andestimate
arguments.- ...
Not currently used.
- truth
The column identifier for the true results (that is
numeric
). This should be an unquoted column name although this argument is passed by expression and supports quasiquotation (you can unquote column names). For_vec()
functions, anumeric
vector.- na_rm
A
logical
value indicating whetherNA
values should be stripped before the computation proceeds.
Value
A tibble
with columns .metric
, .estimator
,
and .estimate
and 1 row of values.
For grouped data frames, the number of rows returned will be the same as the number of groups.
For gm_vec()
, a single numeric
value (or NA
).
See also
Other descriptive statistics:
cv()