View source: R/extrapolate_quantiles.R
extrapolate_quantiles | R Documentation |
This function takes a quantile_pred
vector and returns the same
type of object, expanded to include
additional quantiles computed at probs
. If you want behaviour more
similar to stats::quantile()
, then quantile(x,...)
may be more
appropriate.
extrapolate_quantiles(x, probs, replace_na = TRUE, ...)
x |
A vector of class |
probs |
a vector of probabilities at which to calculate quantiles |
replace_na |
logical. If |
... |
additional arguments passed on to the |
a quantile_pred
vector. Each element
of x
will now have a superset
of the original quantile_values
(the union of those and probs
).
dstn <- quantile_pred(rbind(1:4, 8:11), c(.2, .4, .6, .8))
# extra quantiles are appended
as_tibble(extrapolate_quantiles(dstn, probs = c(.25, 0.5, .75)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.