[R] Sweave in makefile under Win XP
p.dalgaard at biostat.ku.dk
Thu Apr 29 09:45:27 CEST 2004
"Ladelund, Steen" <STEL at glostruphosp.kbhamt.dk> writes:
> Hi all.
> To automate the production of a document I want to have something like:
> test.tex : test.Rnw
> "Sweave("test.Rnw") "| R --no-restore --no-save
> in a makefile.
> This however gives an error as R states: Sweave("test.Rnw") : not found.
If that's what you did, I don't think R ever saw it. The shell would
think that you were trying run a program called "Sweave(test.Rnw) ".
If you want to pipe the string to R, you need at least an "echo" in
front of it. Also beware that the quotes as written don't match up the
way I think you think they do.
echo "Sweave(\"test.Rnw\")"| R --no-restore --no-save
should be more like it. Notice that you need to start the line with a
TAB inside a makefile, not 4 spaces (or did your email program just
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help