summarise_coef_of_variation {tidySummaries}R Documentation

Summarise Coefficient of Variation

Description

Calculates the coefficient of variation (CV = sd / mean) for numeric vectors, matrices, data frames, or tibbles.

Usage

summarise_coef_of_variation(x)

Arguments

x

A numeric vector, matrix, data frame, or tibble.

Value

A tibble: - If input has one numeric column or is a numeric vector: a tibble with a single value. - If input has multiple numeric columns: a tibble with variable names and coefficient of variation values.

Examples

summarise_coef_of_variation(iris)
summarise_coef_of_variation(iris$Petal.Length)
summarise_coef_of_variation(data.frame(a = rnorm(100), b = runif(100)))

[Package tidySummaries version 0.1.0 Index]