quantile {FLCore} | R Documentation

## Method quantile

### Description

Quantiles for `FLQuant-class` objects can be obtained with this method. Default quantiles returned are `seq(0, 1, 0.25)`, but they can be specified using the `probs` argument. The returned `FLQuant-class` object uses the sixth dimension (iter) to store the requested quantiles, with appropriate dimnames.

For objects of class `FLQuantPoint-class`, quantile is merely an accessor for two elements of the sixth dimension, `lowq` and `uppq`. You could use the `lowq` and `uppq` methods instead.

### Generic function

quantile(x, ...)

### Methods

signature(x=FLQuant) :
  Describe method
signature(x=FLQuantPoint) :
  Describe method

### Author(s)

The FLR Team

### See Also

quantile, FLQuant-class, FLQuantPoint-class

### Examples

    # Normally distributed FLQuant, with log-normal random mean and fixed sd of 20
    flq <- rnorm(100, FLQuant(rlnorm(20), dim=c(2,10)), 20)

    # obtains all standard quantiles (0, 0.25, 0.5, 0.75 and 1)
    quantile(flq)
    # select one of them by name
    quantile(flq)[,,,,,'0.75']
    # calculates the 0.05 quantile only
    quantile(flq, 0.05)

    # creates an FLQuantPoint from previous FLQuant
    flp <- FLQuantPoint(flq)
    # return each of the two quantiles (025 and 0.75)
    quantile(flp, 0.25)
    quantile(flp, 0.75)

[Package FLCore version 2.2 Index]