[R] Sweave and graphic output locations

Stefano Calza stecalza at tiscali.it
Tue Mar 30 19:52:49 CEST 2004


Hi,
you can use \SweaveOpts{prefix.string=foo/bar}
So you'll have your graphs put into directory foo and named bar-*

HIH,
Stefano

On Tue, Mar 30, 2004 at 12:31:36PM -0500, Max_Kuhn at bd.com wrote:
> 
> Hello,
> 
> I'm using R1.8.1 on windows 2000 and version 1.8.1 of the tools package.
> 
> I am attempting to have Sweave write files to a different directory via:
> 
> testfile <- system.file("Sweave", "Sweave-test-1.Rnw",
>                         package = "tools")
> 
> ## create a LaTeX file
> Sweave(
>       testfile,
>       output = "C:/temp/Sweave-test-1.tex",
>       stylepath = FALSE
>       )
> 
> but it places the graphics files in the working directory.
> 
> Does anyone have any ideas on getting all of the files in one place
> (automatically)? The include option says:
> 
> include: logical (TRUE), indicating whether input statements for text
> output and includegraphics statements for figures should be auto-generated.
> Use include=FALSE if the output should appear in a different place than the
> code chunk (by placing the input line manually).
> 
> If this is the solution, the default value should already be resolving it
> (correct?). I'd try setting it to FALSE, but it's not clear how to call
> this option.
> 
> Thanks in advance,
> 
> Max
> 
> 
> 
> 
> **********************************************************************
> This message is intended only for the designated recipient(s...{{dropped}}
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list