title: How to replace backslash \ in R with gsub?
body: <p>I would like to ammend some .tex files from within R.
  I read the file with readLines() but I cannot replace the following text.</p>
  
  <pre><code>tex &lt;- "$\\times$"
  new_tex &lt;- gsub("$\\times$", "\\ $\\times$", tex)
  new_tex
  </code></pre>
  
  <p>It seems that it cannot find the <code>$\\times$</code>
  But even if it does, is it possible to write \ without escaping them?</p>
  
  <p>Thank you in advance!</p>