Learn R Programming

MQMF (version 0.1.1)

quants: quants used in apply to estimate quantiles across a vector

Description

quants used in 'apply' to estimate quantiles across a vector. Can also be used within tapply, etc.

Usage

quants(invect, probs = c(0.025, 0.05, 0.5, 0.95, 0.975))

Arguments

invect

vector of values

probs

a vector of quantile, default=c(0.025,0.05,0.5,0.95,0.975)

Value

a vector of the probs quantiles

Examples

Run this code
# NOT RUN {
x <- matrix(rnorm(1000),ncol=10,nrow=100)
apply(x,2,quants)
apply(x,2,quants,probs=c(0.1,0.5,0.9))
# }

Run the code above in your browser using DataLab