put_var: Put a variable(s) into a specified 'environment'.

Description Usage Arguments Value Author(s) See Also Examples

Description

Put a variable(s) into a specified environment, i.e. copy a variable(s) from one environment to another environment

Usage

1
put_var(var, from.envir = parent.frame(), to.envir = .GlobalEnv)

Arguments

var

character name of variable in from.envir to copy

from.envir

environment where variable is to be copied from

to.envir

environment where variable is to be copied to

Value

invisible

Author(s)

Thomas P. Harte

See Also

copy.vars

Examples

1
2
3
4
5
6
7
8
9
	 e<- new.env()
	 local({
		a<- "a"
		b<- "this is 'b'"
		x<- pi
	 }, env=e)
  f<- new.env()
	 put_var("x", from=e, to=f)
	 whos(sort="Name", env=f)

tharte/tutils documentation built on Feb. 11, 2020, 9:17 a.m.