center_stats {MSMU} | R Documentation |
Summary of Central Tendency
Description
Computes a variety of center statistics for a numeric vector, including:
mean, median, trimmed means (10% and 25%), and estimated mode (via probability density function
using estimate_mode()
).
Usage
center_stats(x)
Arguments
x |
A numeric vector. |
Value
A named numeric vector with values for:
- mean
Arithmetic mean
- median
Median
- trim25
25% trimmed mean
- trim10
10% trimmed mean
- est_mode
Estimated mode from
estimate_mode()
See Also
Examples
# Center Stats of continuous random data
set.seed(123)
x <- rnorm(1000, mean=50, sd=10)
center_stats(x)
# Center Stats of Sepal Length in iris data set
data("iris")
center_stats(iris$Sepal.Length)
[Package MSMU version 0.1.2 Index]