Skip to content
Prev 309896 / 398502 Next

Problem compiling Rnw file

On Nov 5, 2012, at 9:23 AM, Riccardo Romoli <ric.romoli at gmail.com> wrote:

            
You would need to dig into the Sweave code, but presumably, once you change the current working directory, certain aspects of the environment in which Sweave is operating are changed. Perhaps not all, since some things still seem to work.

I have never used setwd() within a .Rnw file, not because of prior experience, but because I have never needed to.

Just use the full path to whatever external files you need, rather than changing the working directory in order to avoid using the full path. That has worked for me over hundreds of Sweave reports over the course of many years.

Regards,

Marc Schwartz