View source: R/other-functions.R
| fn.PMF_quantile | R Documentation |
Computes a quantile of discrete weighted distribution by constructing the cumulative distribution function from probability masses
fn.PMF_quantile(val, q, mass)
val |
Numeric vector of values |
q |
Quantile to compute (between 0 and 1, e.g., 0.5 for median) |
mass |
Numeric vector of weights/masses corresponding to each value |
Numeric quantile value. For the minimum value, returns that value. Otherwise, returns the average of adjacent values for smoothness.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.