[R] SweaveInput and absolute paths

Kevin R. Coombes krc at mdacc.tmc.edu
Thu Apr 26 18:47:28 CEST 2007


Hi,

Is there a way to turn off the automatic inclusion of "./" at the 
beginning of a path specified in an \SweaveInput{} instruction?

I'd like to create some reusable "template modules" of Sweave code and 
put them in a standard directory like
	/Resources/Affymetrix
Then the corresponding file that uses one of these would include a 
command like

\SweaveInput{/Resources/Affymetrix/libload.Rnw}

If I try that (in R 2.4.0 on either Windows or UNIX), however, I get an 
error message to the following effect:
--------------------------------
Writing to file affyExample.tex
Processing code chunks ...
Error in SweaveReadFile(c(ifile, file), syntax) :
	no Sweave file with name './/Resources/Affymetrix/libload.Rnw' found
In addition: Warning message:
list.files: './/Resources/Affymetrix' is not a readable directory
--------------------------------
Of course it cannot find the files if it insists on looking in the wrong 
place....

On a related note, where is SweaveInput documented besides in the R help 
archives?

Thanks,
	Kevin



More information about the R-help mailing list