Learn R Programming

MVar (version 2.2.5)

CoefVar: Coefficient of variation of the data.

Description

Find the coefficient of variation of the data, either overall or per column.

Usage

CoefVar(data, type = 1)

Value

Coefficient of variation, either overall or per column.

Arguments

data

Data to be analyzed.

type

1 Coefficient of overall variation (default),
2 Coefficient of variation per column.

Author

Paulo Cesar Ossani

Marcelo Angelo Cirillo

References

Ferreira, D. F.; Estatistica Basica. 2 ed. rev. Lavras: UFLA, 2009. 664 p.

Examples

Run this code
data(DataQuan) # data set

data <- DataQuan[,2:8]

res <- CoefVar(data, type = 1) # Coefficient of overall variation
round(res,2)

res <- CoefVar(data, type = 2) # Coefficient of variation per column
round(res,2)

Run the code above in your browser using DataLab