means_choice | R Documentation |
Computes mean's of x
. The list returned has an attribute "mindiff"
which contains
the smallest distance between two mean values before rounding.
If winsor
and/or trim
set to NA
then the trimmed and/or winsorized mean are not computed.
Currently are implemented
mean
arithmetic mean
median
median
harmonic
harmonic mean
geometric
geometric mean
mode
(first) mode
trim
trimmed mean
winsor
winsorized mean
means_choice(x, digits, na.rm = TRUE, trim = 0.2, winsor = 0.2)
means(x, digits, na.rm = TRUE, trim = 0.2, winsor = 0.2)
x |
numeric: data values |
digits |
numeric: integer indicating the number of decimal places for rounding (negative values are allowed) |
na.rm |
logical: should |
trim |
numeric: the fraction (0 to 0.5) of observations to be trimmed from each end of |
winsor |
numeric: the fraction (0 to 0.5) of observations to be moved from each end of |
a list with mean values
x <- c(runif(9), 3)
means_choice(x, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.