Hi, On Wednesday 10 March 2010, meik michalke wrote: > yes and no: R can do system calls, and it actually does that later in my > plugin. on the other hand, the previous PHP system call is used to check > paths to the needed executables, to then *generate* the R system calls > with the collected information (see below).
yes, understood. What I mean is, why not just generate the following R code
unconditionally (just a sketch):
# locate required tools
pdflatex.cmd <- Sys.which ("pdflatex")
pdftk.cmd <- Sys.which ("pdftk")
if ((pdflatex.cmd == "") | (pdftk.cmd == "")) stop ("Could not find all
required
tools")
# set up temporary directory
dir <- tempfile ("klausuR")
if (!dir.create (dir, recursive=TRUE)) stop ("Could not create temporary dir")
on.exit (unlink (dir))
# ok, we're set to go
cmd <- paste (..., pdflatex.cmd, ..., pdftk.cmd, ...)
System (cmd)
I.e. simply move the logic into the generated R code.
Regards
Thomas
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
_______________________________________________ RKWard-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rkward-devel
