title: R - rm() objects in loop
body: <p>I want to be able to remove objects in a loop dependent on <code>i</code>; for example I have objects called <code>A1, A2, A3, A4, ..., A999, A1000</code>. What I want is something like:</p>
  
  <pre><code>for(i in 1:1000){
    rm(paste0("A", i))
  }
  </code></pre>
  
  <p>I know that this just pastes <code>A1</code>, <code>A2</code>, etc., as text, but I don't know where to go from here to convert that text to an object.</p>
  
  <p>I have tried using <code>get</code> and <code>lapply</code>, but I am clearly doing this wrong.</p>