modal(x, ..., ties='random', na.rm = FALSE)
cv(x, ..., aszero=FALSE, na.rm = FALSE)
TRUE
, a zero is returned (rather than an NA) if the cv of single value is computedsd
is NA
and cv
returns NA
if aszero=FALSE
(the default). However, if (aszero=TRUE
), cv
returns 0
.data <- c(0,1,2,3,3,3,3,4,4,4,5,5,6,7,7,8,9,NA)
modal(data, na.rm=TRUE)
cv(data, na.rm=TRUE)
Run the code above in your browser using DataLab