Changelog
Source:NEWS.md
Version 0.9.0
CRAN release: 2022-12-16
New Features
parse_env_subset()
gained argumentis_variable
to control whether or not the inferred element named should be checked if it is a valid variable name.
Version 0.8.0
CRAN release: 2019-12-05
Signficant Changes
- S3 method
lengths()
forlistenv
is no longer exported.
New Features
- Made several error messages more informative. The downside is that those messages are no longer translated (because they are no longer aligned with built-in R error messages which have translations).
Bug Fixes
parse_env_subset(x[1, names])
on a listenvx
matrix would throw errorError in if (any(i < 0)) { : missing value where TRUE/FALSE needed
if one of the elements innames
specifies a non-existing column name.parse_env_subset(x[])
on a listenvx
would throw an error onInvalid subset: x[]
.parse_env_subset(x[names])
on a listenvx
would throw an error onlength(x) = 2 > 1 in coercion to logical(1)
whenlength(names) > 1
and_R_CHECK_LENGTH_1_LOGIC2_=true
.parse_env_subset(x[1,idxs])
on a listenvx
would throw an error onlength(x) = 2 > 1 in coercion to logical(1)
withlength(idxs) > 1
and_R_CHECK_LENGTH_1_LOGIC2_=true
.parse_env_subset(x[[names]])
on a regular environmentx
withlength(names) > 1
would not throw an error, whereasx[[names]]
would.parse_env_subset(x[[1]])
on a regular environmentx
would not throw an error, whereasx[[1]]
would.
Version 0.7.0
CRAN release: 2018-01-21
New Features
Now it is possible to set the dimension on an empty list environment without first resizing it with
length()
, e.g.x <- listenv(); dim(x) <- c(2, 3)
.Now it is possible to remove multiple elements by assigning NULL, e.g.
x[c(2:3, 10)] <- NULL
andx[, "B"] <- NULL
.Added
lengths()
for list environments. Requires R (>= 3.3.0).dim_na(x) <- dims
, wheredims
contain exactly one missing value, will set the “missing” dimension based on the length ofx
and the other dimensions specified, e.g. withlength(x) == 6
,dim_na(x) <- c(2, NA)
will setdim(x) <- c(2, 3)
. This works for all types of object to which dimensions can be assigned - not only list environments.Added
is.matrix()
,is.array()
,as.vector()
, andas.matrix()
for list environments.
Bug Fixes
print()
on a named, empty list environment would output an empty string.Removing an element from a list environment did not remove dimensions, e.g.
x$a <- NULL
.
Version 0.5.0
CRAN release: 2015-10-31
New Features
Add support for assigning elements when creating list environment similarly how to lists work, e.g.
x <- listenv(a = 1, b = 2)
.length(x) <- n
now expand/truncate a list environment.Added
unlist()
andall.equal()
for list environments.
Version 0.4.0
CRAN release: 2015-08-08
New Features
Added
as.listenv()
.CONSISTENCY: Assigning NULL now removes element just as lists, e.g.
x$a <- NULL
. To assign value NULL, dox['a'] <- list(NULL)
.Added support for subsetting with
[()
, which returns another list environment, e.g.x[2:3]
,x[-1]
, andx[c(TRUE, FALSE)]
.Added
[<-
assignment, e.g.x['a'] <- 1
andx[2:3] <- c(3,8)
.CLEANUP: Dropped stray debug code.
Version 0.2.4
New Features
- Added helper function
parse_env_subset()
.
Version 0.2.3
New Features
-
print()
onlistenv
handles empty and no-namedlistenv
:s better.
Version 0.2.1
New Features
-
get_variable()
gained argumentmustExist
.
Version 0.1.4
New Features
- Added
print()
forlistenv
:s.