Coefficient of Variation (Cv)
Usage
cv(data, ...)
# S3 method for class 'data.frame'
cv(data, truth, na_rm = TRUE, ...)
cv_vec(truth, na_rm = TRUE, ...)Arguments
- data
A
data.framecontaining the columns specified by thetruthandestimatearguments.- ...
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, anumericvector.- na_rm
A
logicalvalue indicating whetherNAvalues 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 cv_vec(), a single numeric value (or NA).
See also
Other descriptive statistics:
gm(),
measure_set()