Learn R Programming

scidb (version 1.2-0)

quantile: Sample Quantiles

Description

Compute sample quantiles of a single-attribute SciDB array.

Usage

"quantile"(x, probs=seq(0,1,0.25), type=7, ...) "quantile"(x, probs=seq(0,1,0.25), type=7, ...)

Arguments

x
a scidb or scidbdf object.
probs
a numeric vector of probabilities with value in [0,1].
type
either 1 or 7, selecting the two available quantile algorithms (see help for quantile for more details).
...
optional arguments that might be used in a future version.

Value

A two-attribute SciDB data frame-like array with length(probs) rows is returned. The first attribute contains probs and the second attribute the sample quantiles.

Details

If the input array contains more than one attribute, the first numeric attribute will be chosen (with a warning). Use project to select a single attribute.

The SciDB quantile function only supports types 1 and 7 at the time of this writing. Quantile type 1 can be used with non-numeric values, as long as they can be ordered. See quantile for much more detail on the calculation.

See Also

quantile

Examples

Run this code
## Not run: 
# x <- as.scidb(rnorm(1000))
# quantile(x)[]
# 
# quantile(x,type=1)[]
# ## End(Not run)

Run the code above in your browser using DataLab