https://github.com/cran/fOptions
Tip revision: 9c58bb98a62fa8226a1f41c6fb1f98485b101250 authored by Rmetrics Core Team on 08 August 1977, 00:00:00 UTC
version 270.74
version 270.74
Tip revision: 9c58bb9
fOptionsEnv.R
.fOptionsEnv <- new.env(hash = TRUE)
.setfOptionsEnv <-
function(...)
{
x <- list(...)
nm <- names(x)
if (is.null(nm) || "" %in% nm)
stop("all arguments must be named")
sapply(nm, function(nm) assign(nm, x[[nm]],
envir = .fOptionsEnv))
invisible()
}
.getfOptionsEnv <-
function(x = NULL, unset = "")
{
if (is.null(x))
x <- ls(all.names = TRUE, envir = .fOptionsEnv)
### unlist(mget(x, envir = .fOptionsEnv, mode = "any",
### ifnotfound = as.list(unset)), recursive = FALSE)
get(x, envir = .fOptionsEnv, mode = "any")
}