title: How to set R to default options?
body: <p>I always start my scripts with:</p>
  
  <pre><code>rm(list=ls())
  </code></pre>
  
  <p>to clear my workspace to avoid conflicts between different scripts. However, I'm looking for a way to also set all changed options to their default state. For instance, in some scripts I need to change the SS type by setting:</p>
  
  <pre><code>options(contrasts=c(unordered="contr.sum", ordered="contr.poly"))
  </code></pre>
  
  <p>In other scripts I need to use the default option (and since it is default I do not specify it directly) that is:</p>
  
  <pre><code>options(contrasts=c(unordered="contr.treatment", ordered="contr.poly"))
  </code></pre>
  
  <p>but if a script with the changed options was just used before, the option is obviously changed without me noticing it.</p>
  
  <p>Is there a command that I could put on top of my scripts to reset R to default options?</p>