I’m having problems running pgfSweave from the command line. In the pgfSweave manual it states that the package must be installed from source in order to be run as:
R CMD pgfSweave myfile.Rnw
So I installed using:
install.packages("pgfSweave", type = "source")
and the package appeared to install without a hitch. I then tried running the above R CMD (directly from a bash shell and also from within a make file) and received the following error:
/Library/Frameworks/R.framework/Resources/bin/Rcmd: line 61: exec: pgfSweave: not found
I’ve read the manuals but haven’t come across anyone mentioning this problem. I’m running R version 2.14.0, OSX 10.5.8, and pgfSweave version 1.2.1
(Btw, I should note that I can use the following command from within R with no problem:
pgfSweave(file = "myfile.Rnw", compile.tex = FALSE)
but i’d like to use a make file and do everything from the command line)
The
pgfSweavemanual provides some nice direction about how you can get the command-line interface up and running. Here’s the key bit, from page 13 of the manual (warning: pdf):So, for the Mac OS, you just need to place a symbolic link named
pgfsweavein$R_HOME/bin/, pointing to$R_HOME/library/pgfSweave/exec/pgfsweave-script.R. ($R_HOMEis the directory path got by typingR.home()at the R command line.)In case you want more details about how this is supposed to be implemented at the time of package installation, have a look at the script
install-script.Rin$R_HOME/library/pgfSweave/exec/. It includes separate branches, to be executed depending on the type of operating system, and concludes with this reassuring message (to be printed if installation of the symbolic link fails):