Learn R Programming

tdigest (version 0.4.2)

td_value_at: Return the value at the specified quantile

Description

Return the value at the specified quantile

Usage

td_value_at(td, q)

# S3 method for tdigest [(x, i, ...)

Value

the computed quantile (double)

Arguments

td

t-Digest object

q

quantile (range 0:1)

x

a tdigest object

i

quantile (range 0:1)

...

unused

Examples

Run this code
td <- td_create(10)

td_add(td, 0, 1) %>%
  td_add(10, 1)

td_value_at(td, 0.1)
td_value_at(td, 0.5)
td[0.1]
td[0.5]

Run the code above in your browser using DataLab