[Rd] Sweave choking on \\ in filename

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Mon Nov 29 14:07:27 CET 2010

Dear all,

Sweave chokes when using "\\" in the path to the Rnw file. Using "/"
works fine. The problem is that Eclipse+StatET uses "\\" in the
And example of the error, traceback and sessionInfo are given below.

Best regards,


> Sweave("Q:\\BMK\\cursussen\\interne_opleiding\\deelnemerslijst.Rnw",
Writing to file deelnemerslijst.tex
Processing code chunks ...
 1 : echo term verbatim

Error:  chunk 1 
Error : '\B' is an unrecognized escape in character string starting
> traceback()
4: stop(msg, err, call. = FALSE)
3: RweaveTryStop(chunkexps, options)
2: driver$runcode(drobj, chunk, chunkopts)
1: Sweave("Q:\\BMK\\cursussen\\interne_opleiding\\deelnemerslijst.Rnw", 
       syntax = "SweaveSyntaxNoweb")

> sessionInfo()
R version 2.12.0 (2010-10-15)
Platform: i386-pc-mingw32/i386 (32-bit)

[1] LC_COLLATE=Dutch_Belgium.1252  LC_CTYPE=Dutch_Belgium.1252   
[3] LC_MONETARY=Dutch_Belgium.1252 LC_NUMERIC=C                  
[5] LC_TIME=Dutch_Belgium.1252    

attached base packages:
[1] grDevices datasets  splines   graphics  stats     tcltk     utils

[8] methods   base     

other attached packages:
[1] svSocket_0.9-51 TinnR_1.0.3     R2HTML_2.2      Hmisc_3.8-3    
[5] survival_2.36-1

loaded via a namespace (and not attached):
[1] cluster_1.13.2  grid_2.12.0     lattice_0.19-15 svMisc_0.9-61  
[5] tools_2.12.0   
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie & Kwaliteitszorg
Gaverstraat 4
9500 Geraardsbergen

Research Institute for Nature and Forest
team Biometrics & Quality Assurance
Gaverstraat 4
9500 Geraardsbergen

tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to
say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of
~ John Tukey

More information about the R-devel mailing list