HenrikBengtsson / listenv

R package: listenv - Environments Behaving As Lists
https://listenv.futureverse.org
30 stars 2 forks source link

x[[kk]] <- NULL on non-existing element gives warning #21

Closed HenrikBengtsson closed 8 years ago

HenrikBengtsson commented 8 years ago
> library("listenv")
> x <- listenv(a=1, b=2)
> x[[4]] <- 4
> x[[3]] <- NULL
Warning message:
In remove(list = var, envir = x, inherits = FALSE) : object 'NA' not found

This is because the "mapped" element is NA_character;

> x <- listenv(a=1, b=2)
> x[[4]] <- 4
> map(x)
                      a                       b
       ".listenv_var_1"        ".listenv_var_2"                      NA

".listenv_var_3.000000"