title: An error ['\+' is an unrecognized escape in character string starting "\+" while creating a R package
body: <p>I tried to create a package using some functions and scripts I created (using X11 on a Mac). While R CMD check was doing its work, it encountered a problem as follows:</p>
  
  <pre><code>temp = trim(unlist(strsplit(lp.add(ranefterms[[i]]), 
  +                     "\+")))
  Error: '\+' is an unrecognized escape in character string starting "\+"
  </code></pre>
  
  <p>The oddest thing, however, is that my function actually does NOT have "\ +". Instead, it has "\ \ +" (see below). So I don't know why "\ \ +" is recognized as "\ +".</p>
  
  <pre><code>for(i in 1:n)
     temp = trim(unlist(strsplit(lp.add(ranefterms[[i]]), '\\+')))
  </code></pre>
  
  <p>To dig a little further, I looked at the packageName-Ex.R file in the Rcheck folder. As it turned out, all the "\ \"s have been changed to "\" in the checking process (e.g., the double slashes I need for functions such as strsplit() and grepl())</p>
  
  <p>I wonder what may have been the cause of it. Sorry that I can't come up with a reproducible example...</p>