title: Escaping backslash (\) in string or paths in R
body: <p>Windows copies path with backslash <code>\</code>, which R does not accept. So, I wanted to write a function which would convert <code>\</code> to <code>/</code>. For example:</p>
  <pre><code>chartr0 &lt;- function(foo) chartr('\','\\/',foo)
  </code></pre>
  <p>Then use <code>chartr0</code> as...</p>
  <pre><code>source(chartr0('E:\RStuff\test.r'))
  </code></pre>
  <p>But <code>chartr0</code> is not working. I guess, I am unable to escape <code>/</code>. I guess escaping <code>/</code> may be important in many other occasions.</p>
  <p>Also, is it possible to avoid the use <code>chartr0</code> every time, but convert all path automatically by creating an environment in R which calls <code>chartr0</code> or use some kind of temporary use like using <code>options</code></p>