Formatted Median
A function to calculate and format a median.
fmt_median(x, format = "%.1f")
x |
The input data vector or data frame column. |
format |
A formatting string suitable for input into the
|
The formatted median value.
Other helpers:
fmt_cnt_pct(),
fmt_mean_sd(),
fmt_n(),
fmt_quantile_range(),
fmt_range()
v1 <- c(4.3, 3.7, 8.7, 6.1, 9.2, 5.6, NA, 0.7, 7.8, 4.9) # Format median fmt_median(v1) # Output # "5.6"
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.