title: Natural way to represent hash tables/dictionaries/maps in R
body: <p>I want to use a dictionary/map data structure in R, similar to Python's <code>dict</code> or C++ STL's <code>std::map</code> or <code>std::hash_map</code>.</p>
  
  <p>I can do all of the following. Is there a difference in their use and/or performance? And if so, which is the best way to have such a data structure in R?</p>
  
  <pre><code>&gt; mm = c()
  &gt; mm["my key"] = 10
  &gt; mm[["my key"]]
  [1] 10
  &gt; mm
  my key 
      10
  
  &gt; mm = list()
  &gt; mm["my key"] = 10
  &gt; mm[["my key"]]
  [1] 10
  &gt; mm
  $`my key`
  [1] 10
  
  &gt; mm = vector()
  &gt; mm["my key"] = 10
  &gt; mm[["my key"]]
  [1] 10
  &gt; mm
  my key 
      10 
  </code></pre>