quants | R Documentation |
quants used in 'apply' to estimate quantiles across a vector. Can also be used within tapply, etc.
quants(invect, probs = c(0.025, 0.05, 0.5, 0.95, 0.975))
invect |
vector of values |
probs |
a vector of quantile, default=c(0.025,0.05,0.5,0.95,0.975) |
a vector of the probs quantiles
x <- matrix(rnorm(1000),ncol=10,nrow=100)
apply(x,2,quants)
apply(x,2,quants,probs=c(0.1,0.5,0.9))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.