Learn R Programming

tdigest (version 0.4.2)

as.list.tdigest: Serialize a tdigest object to an R list or unserialize a serialized tdigest list back into a tdigest object

Description

These functions make it possible to create & populate a tdigest, serialize it out, read it in at a later time and continue populating it enabling compact distribution accumulation & storage for large, "continuous" datasets.

Usage

# S3 method for tdigest
as.list(x, ...)

as_tdigest(x)

Arguments

x

a tdigest object or a tdigest_list object

...

unused

Examples

Run this code
set.seed(1492)
x <- sample(0:100, 1000000, replace = TRUE)
td <- tdigest(x, 1000)
as_tdigest(as.list(td))

Run the code above in your browser using DataLab