cv | R Documentation |

Returns the observed coefficient of variation (CoV) of a given sample
`x`

.

If `na.rm`

is true then missing values are removed before
computation proceeds, as in the case of the `mean()`

function.

```
cv(x, na.rm = TRUE)
```

`x` |
a numeric vector. |

`na.rm` |
a logical value indicating whether NA values should be stripped before the computation proceeds. |

The coefficient of variation is defined as is defined as the
ratio of the standard deviation to the mean. It shows the extent of
variability in relation to the mean of the population.

`cv()`

estimates the CoV of a given sample by computing the ratio of
the sample standard deviation (see `stats::sd`

) to the sample mean.

```
cv(1:10)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.