Skip to content

Immutables

1.2.0Package record

Fast and Functional Data Structures

0packages depend
2.2Kdownloads / year
86.8%test coverage
13/13flavors OK

Overview

About

Provides fast, side-effect free data structures, including catenable named lists, priority queues, double-ended queues, ordered sequences, and interval indices. Implementation is based on the finger-tree data structure of Hinze and Paterson (2006) doi:10.1017/S0956796805005769.

Changes in 1.2.0

Deprecated

  • peek_overlaps(), peek_all_overlaps(), pop_overlaps(), and pop_all_overlaps() are renamed to peek_overlapping(), peek_all_overlapping(), pop_overlapping(), and pop_all_overlapping(). The new names match peek_containing() and make clear that the non-all versions return a single match. The old names still work but emit a deprecation warning, and will be removed in a future release.

New features

  • pop_front(), pop_back(), and pop_at() on an ordered_sequence now return the popped element's key alongside value and remaining (NULL on a miss), matching pop_key(), pop_min(), and the interval pop_* helpers. Plain flexseq pops are unchanged.
Show all changes in 1.2.0Hide the rest of the changes in 1.2.0
  • New key_at() reads the key of an ordered_sequence element at a given one-based position without removing it (the positional companion to peek_at(), and the general form of min_key() / max_key()).
  • New nearest_key() returns the existing key closest to a query key, composing with peek_key() / pop_key(). It resolves by order alone at the extremes and on an exact hit (any key type), and uses abs(query - key) when the query falls strictly between two distinct keys (numeric/Date/POSIXct). The ties argument resolves an equidistant tie between two distinct keys: "lower" (default), "upper", or "both" (returns both keys). It errors for non-subtractable keys (e.g. character) in that between case, where "closer" is undefined.

Performance

  • ordered_sequence key-boundary lookups now use a native C++ descent for numeric, character, and logical keys, speeding up lower_bound(), upper_bound(), peek_key(), pop_key(), peek_all_key(), pop_all_key(), count_key(), elements_between(), and count_between().
  • The implementation now uses lazy evaluation matching the Hinze and Paterson reference implementation, making amortized-constant-time end access claims true when structures are used in a persistent setting.

Documentation and fixes

  • Minor documentation improvements
  • Trimming of unit tests to speed check times on CRAN machines

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 6.6 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK5 OK2026-04-29
Advisories

none known

Documentation

In release 1.2.0
READMEYes · 231 wordsVignettesYes · 7 · dynamicNEWSYes · 100% structured · mentions 1.2.0Citation fileYes · computed when R runs itWebsiteYes · pkgdown

The repository also keeps web-only articles.

Help pages
104 (7 internal)includes a package overview page
Examples that run
100%98 run in a plain check (1 of them under a condition)
Exported functions with examples
99%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%

Downloads

2.2K
CRAN downloads in the past year
Rank #10,869 · ~6/day · ~179/mo
Daily download trend is not available in this view yet.
38430 days
97190 days
2.2K1 year
Compare downloads with other packages →
Also on159 r2u4 autocran

Repository

7Stars
0Forks
0Open issues
0Open PRs
6Releases
357Commits
1Commit identities
functional-programmingpriority-queuersequence
357 commits · Last activity 2026-10-12 · Default branch at 1.2.1, ahead of CRAN 1.2.0 (checked 2026-10-21)
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
not measured
Median days to close, 50 most recently updated closed PRs
0

Releases over time

2026-07-14 · 32026-10-13 · 6
PracticesBeta

10 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/oneilsh/immutables on 2026-10-21.

Continuous integration (2)
GitHub ActionsR CMD check workflow

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

Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-10-12 · The repository has a site deploy workflow

pkgdown site last built 2026-10-12

Coverage (1)
Coverage reporting (Codecov)
Reproducibility and dev environment (2)
data-raw/Makefile
Show all practicesHide 2 practices
CRAN release process (1)
cran-comments.md
Lint, format, editor (1)
RStudio 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 2026-02-15
    Named in .Rbuildignore: .claude
    Named in .gitignore: .claude
    Commits: at least 12 crediting it in the message
  • Gemini CLIfirst seen 2026-02-18
    Config: a file or ignore line, not recorded which
  • Codexfirst seen 2026-04-16
    Named in .Rbuildignore: .codex
    Named in .gitignore: .codex
Models named in its commits
  • Claude Opus 5.59 commits · Sep 2026
  • Claude Opus 4.83 commits · 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
22 external dependencies (excludes base and recommended)

Installing Immutables adds 5 packages (2 with compiled code, 2.7 MB of source tarballs). Heaviest: Rcpp 1.8 MB, rlang 766 KB, formatR 94 KB.

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

Nothing depends on this yet.

Datasets

People & History

People (1)
Author, Maintainer since 1.0.1 (2026)
Releases (3)

Pick two releases to compare their code metrics.

  • 1.2.0Latest
    record
    2026-09-25 · current release · diff ↗ ·
    added 6 exports
    key_at, nearest_key, peek_all_overlapping, peek_overlapping, pop_all_overlapping, pop_overlapping
  • 1.1.0
    record
    2026-04-28 · diff ↗
  • 1.0.1
    record
    2026-04-28
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First published
2026-04-28
Total releases
3 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1.0
Download size
822 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("Immutables")

The package provides a citation file that builds its entry when R runs it. Run citation() to see it.

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 Immutables version 1.2.0 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-25, 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