title: R: evaluate object name before being removed
body: <p>I would like to remove an object, the name of which is contained in a string object.</p>
  
  <pre><code>a &lt;- 1
  b &lt;- "a"
  </code></pre>
  
  <p>I tried to do:</p>
  
  <pre><code>&gt; rm(get(b))
  Error in rm(get(b)) : ... must contain names or character strings
  &gt; remove(eval(b))
  Error in remove(eval(b)) : ... must contain names or character strings
  </code></pre>
  
  <p>How can I get R to remove the object whose name is contained as a string in <code>b</code> (namely, here, <code>a</code>)?</p>