Skip to content

data.sketches

0.1.1Package record

Probabilistic Streaming Data Sketches

0packages depend
988downloads / year
59.4%test coverage
13/13flavors OK

Overview

About

Provides an interface to the 'Apache DataSketches' (https://datasketches.apache.org/) library of streaming algorithms for approximate analytics on data too large to hold or process exactly. Sketches are compact, mergeable summaries built in a single pass over a stream that answer queries such as approximate distinct counts, quantiles and ranks, frequent items and point-frequency estimates, weighted sampling, and set membership with mathematically proven error bounds. Implements Karnin-Lang-Liberty (KLL), Relative Error Quantiles (REQ), t-Digest, HyperLogLog (HLL), Compressed Probabilistic Counting (CPC), Theta, Frequent Items, Count-Min, Array of Doubles, Variance Optimal (VarOpt), Exact and Bounded Probabilistic Proportional-to-Size (EBPPS), and Bloom filter sketches, with native serialization for interoperability with other 'Apache DataSketches' implementations.

Changes in 0.1.1

Bug fixes

  • Interrupting a long $update() or query no longer leaks its input vector. The native loops probed for interrupts with R_CheckUserInterrupt(), which longjmps past C++ destructors and so skipped the release of cpp11's preserve token on the input; an interrupted 40M-element update pinned ~320 MB in R's precious list for the rest of the session. All 25 probe sites now use cpp11::check_user_interrupt(), which unwinds through R_UnwindProtect.
  • theta() and array_of_doubles() sketches rebuilt from bytes = no longer lose their width. A compact payload does not carry the builder lg_k, and the previous fallback to the default width silently cost about an order of magnitude of accuracy on any later $merge() or union — unioning two round-tripped lg_k = 20 sketches retained 4,096 entries instead of 1,048,576. The width is now recovered from the retained-entry count.
Show all changes in 0.1.1Hide the rest of the changes in 0.1.1
  • Native update and query loops no longer pump the R event loop on the first element of every call.

New features

  • $merge() on theta_sketch and array_of_doubles_sketch gains an lg_k argument, matching theta_union() and array_of_doubles_union(). Previously there was no way to control the width of a merge.

Error handling

  • Errors originating in the C++ bridge now carry the same classed conditions as the R-level validators, so tryCatch(datasketches_error = ) catches every failure the package raises. New classes: datasketches_invalid_bytes (corrupt or truncated bytes = payload), datasketches_empty_sketch ($quantile(), $rank(), $cdf(), $pmf(), $min(), $max() on an empty sketch), and datasketches_dead_pointer.
  • Printing or summarising a sketch restored with readRDS() or load() now raises an actionable error pointing at $serialize() / bytes =, rather than reporting that the object is not a valid sketch. External pointers do not survive R's serialization; sketches must be persisted with $serialize().
  • A bytes = payload shorter than 8 bytes passed to hll() now raises datasketches_invalid_bytes rather than datasketches_invalid_args, so a malformed payload has one class across all sketch families. Both classes inherit datasketches_error.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 4.3 min · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK7 OK2026-07-10
Advisories

none known

Documentation

In release 0.1.1
READMEYes · 308 wordsVignettesNoNEWSYes · 100% structured · mentions 0.1.1Citation fileNoWebsiteYes · pkgdown
Help pages
19 (1 internal)includes a package overview page
Examples that run
100%18 run in a plain check
Exported functions with examples
100%
Documented parameters
87%
Return-value docs
100%
Help pages citing references
0%

Downloads

988
CRAN downloads in the past year
Rank #14,113 · ~3/day · ~82/mo
Daily download trend is not available in this view yet.
43230 days
83590 days
9881 year
Compare downloads with other packages →
Also on59 r2u12 autocran

Repository

0Stars
0Forks
1Open issues
0Open PRs
2Releases
29Commits
3Commit identities
29 commits · Last activity 2026-09-30 · Default branch at 0.1.1.9000, ahead of CRAN 0.1.1 (checked 2026-10-21)
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
7
Median days to close, 50 most recently updated closed PRs
0

Releases over time

2026-07-10 · 02026-09-25 · 2
PracticesBeta

8 development-tooling and community-health practices detected across 4 families in the upstream repository

Checks run against github.com/pedrobtz/data.sketches on 2026-10-21.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows

Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-09-30 · The repository has a site deploy workflow

pkgdown site last built 2026-09-24

CRAN release process (1)
cran-comments.md
Lint, format, editor (2)
AirRStudio project
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen on or before 2026-06-17
    Seen in the repository: CLAUDE.md
    Named in .Rbuildignore: .claude, CLAUDE.md
    Pull request it wrote: opened by a project member
    Commits: 1 by its own account · at least 11 crediting it in the message
  • Gemini CLIfirst seen on or before 2026-07-18
    Config: a file or ignore line, not recorded which
Models named in its commits
  • Claude Opus 5.56 commits · Sep 2026
  • Claude Fable 5.13 commits · Sep 2026
  • Claude Opus 4.81 commit · Jun 2026
  • Claude Opus 51 commit · Sep 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
4 external dependencies (excludes base and recommended)

Installing data.sketches adds 3 packages (1 with compiled code, 1.1 MB of source tarballs). Heaviest: rlang 766 KB, cpp11 298 KB, R6 63 KB.

Depends (1)
R >= 4.1.0
Imports (2)
LinkingTo (1)
Suggests (1)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (5)
Author, Maintainer since 0.1.0 (2026), Copyright holder
Contributor
Author of bundled Apache DataSketches C++ code
Contributor
Author of bundled public-domain bit-hack code used in ceiling_power_of_2.hpp
Contributor
Author of bundled public-domain MurmurHash3 code
Contributor
Author of bundled xxhash64.h code
Listed in earlier versions (1)
Sean Eron
no longer listed · 0.1.0 to 0.1.1
Releases (2)

Pick two releases to compare their code metrics.

  • 0.1.1Latest
    record
    2026-09-23 · current release · diff ↗
  • 0.1.0
    record
    2026-07-09
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First published
2026-07-09
Total releases
2 / 1 yrs
License
MIT + file LICENSE OSI
Copyright
See inst/COPYRIGHTS in the package
Minimum R
≥ 4.1.0
Download size
436 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("data.sketches")
Baltazar, P., The Apache Software Foundation, Anderson, S. E., Appleby, A., & Brumme, S. (2026). data.sketches: Probabilistic Streaming Data Sketches (Version 0.1.1) [Computer software]. https://doi.org/10.32614/CRAN.package.data.sketches

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for data.sketches version 0.1.1 [Data set]. HJJB, LLC. Data release v2026-10-23. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy