median2 {mark} | R Documentation |
Median (Q 50)
Description
Median as the 50th quantile with an option to select quantile algorithm
Usage
median2(x, type = 7, na.rm = FALSE)
q50(x, type = 7, na.rm = FALSE)
Arguments
x |
numeric vector whose sample quantiles are wanted, or an
object of a class for which a method has been defined (see also
‘details’). |
type |
an integer between 1 and 9 selecting one of the nine quantile algorithms detailed below to be used. |
na.rm |
logical; if true, any |
Details
q50
is an alias for median2
Value
See stats::quantile()
See Also
Examples
set.seed(42)
x <- rnorm(100)
median(x) # 0.08979677
median2(x, type = 7) # 0.08979677 - default type is 7
median2(x, type = 3) # 0.08976065
[Package mark version 0.8.0 Index]