Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Quantile

Sample quantiles and col/row wise quantiles


Description

Sample quantiles and col/row wise quantiles.

Usage

colQuantile(x,probs,parallel=FALSE)
rowQuantile(x,probs,parallel=FALSE)
Quantile(x,probs)

Arguments

x

Numeric vector whose sample quantiles are wanted. NA and NaN values are not allowed in numeric vectors. For the col/row versions a numerical matrix.

probs

Numeric vector of probabilities with values in [0,1], not missing values. Values up to 2e-14 outside that range are accepted and moved to the nearby endpoint.

parallel

Do you want to do it in parallel in C++? TRUE or FALSE.

Details

This is the same function as R's built in "quantile" with its default option, type = 7. We have also implemented it in a col/row-wise fashion.

Value

The function will return a vector of the same mode as the arguments given. NAs will be removed.

Author(s)

Manos Papadakis

R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>.

See Also

Examples

x<-rnorm(1000)
probs<-runif(10)
sum( quantile(x, probs = probs) - Quantile(x, probs) )

Rfast2

A Collection of Efficient and Extremely Fast R Functions II

v0.0.9
GPL (>= 2.0)
Authors
Manos Papadakis, Michail Tsagris, Stefanos Fafalios and Marios Dimitriadis.
Initial release
2021-03-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.