R Under development (unstable) (2024-10-14 r87233 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(qwraps2) > > e <- new.env() > stopifnot(identical(ll(e), character(0))) > > e$fit <- lm(mpg ~ wt, mtcars) > e$fit2 <- lm(mpg ~ wt + am + vs, data = mtcars) > e$x <- rnorm(1e5) > e$y <- runif(1e4) > e$z <- with(e, x * y) > e$w <- sum(e$z) > e$vroom <- mtcars > e$foo <- function(x) {2 + x} > > stopifnot(identical(rownames(ll(e)), as.character(1:nrow(ll(e))))) > stopifnot(identical(ll(e)$object, c("x", "z", "y", "fit2", "fit", "vroom", "foo", "w"))) > stopifnot(identical(ll(e, order_by = "object")$object, c("fit", "fit2", "foo", "vroom", "w", "x", "y", "z"))) > stopifnot(identical(ll(e, order_by = "object", decreasing = TRUE)$object, rev(c("fit", "fit2", "foo", "vroom", "w", "x", "y", "z")))) > > > proc.time() user system elapsed 0.34 0.06 0.37