Environments Behaving (Almost) as Lists
Overview
List environments are environments that have list-like properties. For instance, the elements of a list environment are ordered and can be accessed and iterated over using index subsetting, e.g. 'x <- listenv(a = 1, b = 2); for (i in seq_along(x)) x[[i]] <- x[[i]] ^ 2; y <- as.list(x)'.
Significant Changes
parse_env_subset()onx[NULL]andx[1, NULL]now selects zero elements - it used to select all elements.parse_env_subset()onx[[]],x[[NULL]],x[[integer(0)]]now gives an error as R does for lists - it used to select all elements.
Bug Fixes
- Growing a list environment with dimensions, e.g.
length(x) <- n,x[[n]] <- value,x[n] <- value, andx$name <- value, wheren > length(x)ornameis a new element, did not drop the dimensions, as done for lists, which leftxin an invalid state. x[[i, j]]on a list environment with dimensions gave an obscure error when the subscripts referred to more than one element.
Show all changes in 1.1.0Hide the rest of the changes in 1.1.0
x[[name]]wherelength(name) != 1gave an obscure error.x[[NA]],x[[NA_integer_]]andx[[NA_real_]]gave an obscure error instead of returningNULL, as done for lists.x[i] <- valuegave an error ificontained zeros, e.g.x[c(0, 2)] <- valueandx[0] <- NULL, instead of ignoring them, as done for lists.x[i] <- valuegave an error ificontained negative indices, e.g.x[-1] <- valueandx[-1] <- NULL, instead of assigning or removing all other elements, as done for lists.x[i]did not handle missing values inias done for lists. For numeric indices, e.g.x[c(1, NA)], it gave an obscure error, and for logical indices, e.g.x[NA]andx[c(TRUE, NA), ], it silently dropped such elements, instead of returningNULLfor them. Similarly,x[i] <- valuedid not ignore missing indices whenvalueis of length one, and did not give an error when it is longer.- Subsetting a list environment did not truncate fractional indices toward zero, as done for lists and arrays. For example,
x[-1.5]returned all elements instead of behaving asx[-1], which drops the first element. Similarly,x[1.5, 2.9]behaved asx[1, 3]instead ofx[1, 2]. parse_env_subset()onx[[i, j]]with dimensions did not give an error for zero indices, e.g.x[[1, 0]], but returned an empty target, although it gave an error forx[[0]].parse_env_subset()onx[[i, j]]with named dimensions returned elementsidxandexistswith dimnames that should not be there.parse_env_subset()onx[[i, j]]with more or fewer dimensions than subscripts would either give an obscure error or, silently, an incorrect index.parse_env_subset()did not truncate fractional indices, as done for lists and arrays. For example,x[[1.5]]gaveidx = 1.5instead of1, andx[[0.5]]gave an obscure error instead of an error on a zero index.parse_env_subset()would treatx[i]asx["i"], and similarly for more dimensions, e.g.parse_env_subset(x[i, j]).parse_env_subset()onx[names]gave an obscure error whenlength(names) > 1and some names did not exist.parse_env_subset()onx$nameandx[["name"]]would reportexists = TRUEeven ifnamedid not exist inxbut in one of the parent environments.parse_env_subset()treated aNULLsubset as an empty one, e.g.x[NULL]andx[1, NULL]selected all elements instead of none. Also,x[[]],x[[NULL]], andx[[integer(0)]], and similarly for more dimensions, e.g.x[[1, ]], did not give an error, as done for lists and arrays.parse_env_subset("1a", envir = x)gave an error on 'Not a valid variable name', although any name is a valid variable name, e.g.x <- listenv("1a" = 1).
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-24
- ERROR12 OK, 1 ERROR2026-06-14
- OK14 OK2026-03-10
Documentation
- Help pages
- 12 (9 internal)
- Examples that run
- 100%3 run in a plain check
- Exported functions with examples
- 33%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 0%
- Median days to close, 50 most recently updated closed issues
- 1
- Median days to close, 50 most recently updated closed PRs
- 308
Stars over time
Forks over time
Issues over time
PRs over time
Commits over time
10 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/futureverse/listenv on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Show all practicesHide 3 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-09-23Commits: at least 1 crediting it in the message
- Claude Opus 5.51 commit · Sep 2026
Dependencies
Installing listenv adds no packages beyond those that come with R.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.1.0Latest
- 1.0.02026-06-22 · diff ↗
- RR 4.6.0 released · 2026-04-24
- 0.10.12026-03-10 · diff ↗
- 0.10.02025-11-02 · diff ↗
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 0.9.12024-01-29 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 0.9.02022-12-16 · diff ↗
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- 0.8.0
- RR 3.6.0 released · 2019-04-26
- RR 3.5.0 released · 2018-04-23
Show 8 earlier eventsHide 8 earlier events
- 0.7.0
- RR 3.4.0 released · 2017-04-21
- RR 3.3.0 released · 2016-05-03
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.02015-05-28
- RR 3.2.0 released · 2015-04-16
Package metadata
- First published
- 2015-05-28
- Total releases
- 12 / 11 yrs
- License
- Apache License (>= 2) · relicensed from LGPL (>= 2.1) in 1.0.0
- Minimum R
- ≥ 3.1.2
- Download size
- 55 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("listenv")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
The repository also keeps a CITATION.cff.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.