mpos {leem} | R Documentation |
Measures of position
Description
Compute all measures of position
Usage
mpos(
x,
trim = 0,
na.rm = FALSE,
rounding = 2,
grouped = TRUE,
details = FALSE,
...
)
Arguments
x |
R object (list) of class leem. Use |
trim |
The fraction (0 to 0.5) of observations to be trimmed from each end of x before the mean is computed. Values of trim outside that range are taken as the nearest endpoint. |
na.rm |
a logical value indicating whether |
rounding |
Numerical object. Rounds the values in its first argument to the specified number of decimal places (default |
grouped |
Logical object. Determines whether the measure of position result will be based on grouped data or not (default |
details |
Logical object. Details of data (default |
... |
further arguments passed to or from other methods. |
Details
The measures of position are: average, median and mode.
Examples
# Example 1: Poisson data
rpois(30, 2.5) |>
new_leem() |>
mpos()
# Example 2: Normal data
rnorm(50, 100, 2.5) |>
new_leem(variable = 2) |>
mpos(grouped = FALSE)