Extending Base 'R' Lists
Overview
Extends the functionality of base 'R' lists and provides specialized data structures 'deque', 'set', 'dict', and 'dict.table', the latter to extend the 'data.table' package.
New features
- Extraction (
[.Container): - Non-standard evaluation (NSE) for ranges and mixed endpoints, e.g.
x[a:b],x[1:c],x[d:2], and negative ranges likex[-(a:c)]. - Multiple indices as separate arguments and
list(...)sugar:x[1, "a", 3:5],x[list(1, "a")]. - Logical indexing improvements with safe recycling and informative warnings when the mask length doesn’t divide the container length;
NAtreated asFALSEwith a warning. .defaultargument supported to fill unknown/out-of-bounds positive indices and unknown names while preserving order and duplicates.x[[TRUE]]now aligns with base R to return the first element.- Replacement (
[<-.Container):
Show all changes in 1.1.0Hide the rest of the changes in 1.1.0
- Supports the same extended indexing options as extraction, including NSE ranges, mixed indices, logical masks, and negative (complement) selection.
x[] <- vtargets all positions; zero-length selections perform no replacement.- Adds unknown names when replacing via character indices; numeric indices must be in-bounds.
- Replacement length is recycled with a warning when not a multiple of the target length.
- Operators & utilities:
- Generic
%in%operator added (#36). - Option for shallow copy when converting container to list.
Fixes
- Allow setting names for initially unnamed containers.
Internal / documentation
- Refactored extract indexing into internal helper
.get_pos_indicesand reused it for replace to ensure consistent semantics. - Reworked and expanded tests; migrated legacy tests to testthat; improved docs and vignettes (interactive usage and replacement examples).
- Renamed vignettes for CRAN ordering (#33); updated README and vignettes (#30).
- Added News menu (this Changelog) to the package site and links to other packages via R universe.
- Clarified OpsReplace documentation (indexing options, NULL assignment, NSE alphanumeric ranges).
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 46
- Examples that run
- 100%43 run in a plain check
- Exported functions with examples
- 95%
- Documented parameters
- 100%
- Return-value docs
- 69%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 93%
- Median days to close, 50 most recently updated closed issues
- 21
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
9 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/rpahl/container on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows
Show all practicesHide 1 practice
This repository shows signs of AI coding tools.
- GitHub Copilotfirst seen 2025-09-19Seen in the repository: .github/copilot-instructions.md, .github/workflows/copilot-setup-steps.ymlPull request: opened by its own accountCommits: 6 by its own account
- Copilot code reviewCommits: at least 3 accepting its review suggestions
Dependencies
Installing container adds 2 packages (1 with compiled code, 5.8 MB of source tarballs). Heaviest: data.table 5.7 MB, R6 63 KB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 1.1.0Latest
- RR 4.5.0 released · 2025-04-11
- 1.0.52024-12-02 · diff ↗
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 1.0.42022-12-11 · diff ↗
- unarchivedReturned to CRAN2022-11-16
- 1.0.32022-11-16 · diff ↗
- archivedRemoved from CRAN2022-10-03check issues were not corrected despite reminders
- 1.0.22022-07-20 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 1.0.12022-02-19 · diff ↗
- 1.0.02021-11-06 · diff ↗ ·
removed 15 exports
getval, itbegin, itget, itget_next, ithas_next, itnext, itpos, pop, popitem, popleft, remove, reverse, set, setval, typeadded 49 exports
OrderedSet, as.cont, as.dict.table, as.orderedset, at, at2, begin, clone, cont, container_options, delete, delete_at, dict.table, discard_at, getContainerOption, get_next, get_value, has_name, has_next, has_value, is.dict.table, is.iterable, is.orderedset, is_empty, next_iter, peek_at, peek_at2, pos, ref_add, ref_addleft and 19 more - RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
Show 4 earlier eventsHide 4 earlier events
- RR 3.6.0 released · 2019-04-26
- 0.3.02018-12-01 · diff ↗ ·
added 42 exports
add, addleft, as.container, as.deque, as.dict, as.set, clear, container, count, deque, dict, discard, empty, getval, has, is.container, is.deque, is.dict, is.iterator, is.set, itbegin, iter, itget, itget_next, ithas_next, itnext, itpos, keys, peek, peekleft and 12 more - 0.2.12018-07-01
- RR 3.5.0 released · 2018-04-23
Package metadata
- First published
- 2018-07-01
- Total releases
- 9 / 8 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.5.0
- Download size
- 466 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("container")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.
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.