R/aaa.R

Defines functions register_object register

.rex <- new.env(parent = emptyenv())
.rex$env <- new.env(parent = emptyenv())
.rex$mode <- FALSE

register <- function(...) {
  names <- gsub("`", "", as.character(eval(substitute(alist(...)))), fixed = TRUE)

  list2env(structure(list(...), .Names = names), envir = .rex$env)
}

register_object <- function(object) {
  list2env(as.list(object), envir = .rex$env)
}

Try the rex package in your browser

Any scripts or data that you put into this service are public.

rex documentation built on Nov. 26, 2021, 5:21 p.m.