x <- rnorm(27)/5 + 1:27
w <- (1:27)/27
quantile_weighted(x, (0:5)/5, weights = w)
quantile_weighted(x, (0:5)/5, weights = w, type = 5)
quantile_weighted(x) - quantile(x, type = 2)
quantile_weighted(x, type = 5) - quantile(x, type = 5)
Run the code above in your browser using DataLab