Description Usage Arguments Details Value Examples
Calculate a sample quantile
1 | sample_quantile(x, p)
|
x |
Vector of data. |
p |
Probability for desired quantile (e.g. 0.5 for median) |
There are many competing definitions of sample quantiles (see Hyndman & Fan, 1996). Here we simply use the R default definition, which corresponds to Definition 7 in Hyndman & Fan. See ?quantile in R for more details.
Sample quantile
1 2 | foo <- rnorm(1000)
sample_quantile(foo, 0.16)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.