Skip to contents

Takes a vector and calculates the ratio of the standard deviation to the mean (coefficient of variation, CV)

Usage

coefficient.of.variation(x, na.rm);

Arguments

x

Vector of numbers to analyze

na.rm

A logical indicating whether or not to ignore (remove) missing values

Value

The modified vector

Author

Sylvia Shiah

Examples

coefficient.of.variation(
  x = rnorm(100)
  );
#> [1] -1205.211