attach_hash: attach/detach a hash to the search path

Description Usage Arguments See Also Examples

View source: R/attach_hash.R

Description

attach/detach a hash to the search path

Usage

1
2
3
4
5

Arguments

hash, what

hash object to attach to the search path.

name

string; name for the environment on the search path

...

additional arguments passed to base::attach()

attach_hash attaches the environment part of a hash to the search path. The values become directly accessible by their keys.

hash:::attach() is a non-exported versions of the same.

See Also

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  h <- hash( a=1, b=2, c=3 )
  
  attach_hash(h)
  search() 
  detach_hash(h)
  search()
  
  hash:::attach( h )
  b                               # 2
  b <<- 25 
  b                               # 25
  h 
  detach(h)
  

decisionpatterns/r-hash documentation built on Feb. 6, 2019, 10:27 p.m.