title: How to iterate through hash items, in an R environment?
body: <p>I'm trying to find a way to use a hash map in R, and after some searching I get the R-environment.
  But how can I iterate through all the items in an environment ?
  When I run the following code, I was expecting output like this :</p>
  
  <p>1</p>
  
  <p>2</p>
  
  <p>But I get two lines of NULL instead, how can I get what I want ?    </p>
  
  <pre><code>map &lt;- new.env(hash=T, parent=emptyenv())
  assign('a', 1, map)
  assign('b', 2, map)
  for (v in ls(map)) {
      print(map$v)
  }
  </code></pre>