title: rm() doesn't seem to empty my R workspace
body: <p>I'm trying to clear my R workspace. Nothing I've found in any thread seems to work - and I've been googling and trying solutions for hours now :(</p>
  
  <p>When I open R and type <code>ls</code>, the console displays all the code from a previous session:</p>
  
  <pre><code>function (name, pos = -1L, envir = as.environment(pos), all.names = FALSE, 
      pattern) 
  {
      if (!missing(name)) {
          nameValue &lt;- try(name, silent = TRUE)
          if (identical(class(nameValue), "try-error")) {
              name &lt;- substitute(name)
              if (!is.character(name)) 
                  name &lt;- deparse(name)
              warning(gettextf("%s converted to character string", 
                  sQuote(name)), domain = NA)
              pos &lt;- name
          }
          else pos &lt;- nameValue
      }
      all.names &lt;- .Internal(ls(envir, all.names))
      if (!missing(pattern)) {
          if ((ll &lt;- length(grep("[", pattern, fixed = TRUE))) &amp;&amp; 
              ll != length(grep("]", pattern, fixed = TRUE))) {
              if (pattern == "[") {
                  pattern &lt;- "\\["
                  warning("replaced regular expression pattern '[' by  '\\\\['")
              }
              else if (length(grep("[^\\\\]\\[&lt;-", pattern))) {
                  pattern &lt;- sub("\\[&lt;-", "\\\\\\[&lt;-", pattern)
                  warning("replaced '[&lt;-' by '\\\\[&lt;-' in regular expression pattern")
              }
          }
          grep(pattern, all.names, value = TRUE)
      }
      else all.names
  }
  &lt;bytecode: 0x2974f38&gt;
  &lt;environment: namespace:base&gt;
  </code></pre>
  
  <p>If I type <code>rm(list=ls())</code> and then type <code>ls</code> again, I get the exact same response - i.e., the code from the previous session hasn't been removed.</p>
  
  <p>By the way, I'm typing <code>ls</code> <em>without</em> the parentheses. Typing <code>ls()</code> with parentheses returns <code>character(0)</code>.</p>
  
  <p>I've also tried clearing the environment via RStudio, and even deleting the ~/.Rdata file. Nothing will clear this workspace. Every time I restart R and type <code>ls</code>, all the old code is still there.</p>
  
  <p>I've already tried the tips in <a href="https://stackoverflow.com/questions/3536036/rmlist-ls-doesnt-completely-clear-the-workspace">this thread</a>, and they don't work for me.</p>
  
  <p>Any idea why this might be happening? Thanks!</p>