Calculate the median of the top ten percentage of the values.

median_top_10(x, na.rm = FALSE)

Arguments

x

A numerical vector

na.rm

Default TRUE: Remove NAs, before calculations.

Value

A numerical value

Examples

median_top_10(mtcars$cyl)
#> [1] 8