Sample quantiles and col/row wise quantiles {Rfast2} | R Documentation |
Sample quantiles and col/row wise quantiles
Description
Sample quantiles and col/row wise quantiles.
Usage
colQuantile(x,probs,parallel=FALSE,cores=0)
## S3 method for class 'matrix'
colQuantile(x,probs,parallel=FALSE,cores=0)
## S3 method for class 'data.frame'
colQuantile(x,probs,parallel=FALSE,cores=0)
rowQuantile(x,probs,parallel=FALSE,cores=0)
Quantile(x,probs,parallel=FALSE)
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 or data.frame. |
probs |
Numeric vector of probabilities with values in [0,1], not missing values. Values up to 2e-14 outside that range are accepted and automatically moved to the nearby endpoint by C++. |
parallel |
Do you want to do it in parallel, for column - row major, in C++? TRUE or FALSE. |
cores |
Number of cores to use for parallelism. Valid only when argument parallel is set to TRUE. Default value is 0 and it means the maximum supported cores. |
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) )