R/addtoenv.R

Defines functions addtoenv

Documented in addtoenv

## environment manipulation function
## Warning: use carefully and avoid name mangling
## solution provided by Gabor Grothendieck (replaces older own function)

addtoenv <- function(L, p = parent.frame()) {
  for(nm in names(L)) {
	  assign(nm, L[[nm]], p)
	  environment(p[[nm]]) <- p
  }
  L
}

Try the simecol package in your browser

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

simecol documentation built on Oct. 7, 2021, 9:20 a.m.