[Rd] "R CMD Sweave --driver=..." woes
In trying to change the driver used by Sweave on the command line using R CMD Sweave --driver=foo I consistently get the "directory 'foo' does not exist' error. (For any value of 'foo', even the default 'RweaveLatex'.) Looking up the source code for function .Sweave that is called by 'R CMD Sweave', I notice that the argument 'driver', if used, is added to the vector of arguments of ''buildVignette' without being named. It ends up being passed to argument 'dir', hence rhe error. I believe the simple patch below should fix the issue, but I wasn't able to test it. Hope this helps. v. Vincent Goulet Professeur titulaire École d'actuariat, Université Laval Index: src/library/utils/R/Sweave.R === --- src/library/utils/R/Sweave.R(revision 78746) +++ src/library/utils/R/Sweave.R(working copy) @@ -516,7 +516,7 @@ do_exit(1L) } args <- list(file=file, tangle=FALSE, latex=toPDF, engine=engine, clean=clean) -if(nzchar(driver)) args <- c(args, driver) +if(nzchar(driver)) args <- c(args, driver=driver) args <- c(args, encoding = encoding) if(nzchar(options)) { opts <- eval(str2expression(paste0("list(", options, ")"))) __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Adding RtangleRuncode and RtangleFinish to exports of utils
Hi, Could R-Core consider adding 'RtangleRuncode' and 'RtangleFinish' to the exports of utils. Their weave equivalent 'makeRweaveLatexCodeRunner' and 'RweaveLatexFinish' are exported, as well as the other tangle utility functions 'RtangleSetup' and 'RtangleWritedoc'. The rationale is not just symmetry. ;-) I'm finishing a small package that will provide "enhanced" drivers for Sweave that are heavily based on the standard RweaveLatex and Rtangle drivers. So much so that I can reuse most of the utiity functions called by RweaveLatex() and Rtangle(). Now, 'RtangleRuncode' and 'RtangleFinish' are not exported and 'R CMD check' really does not like that I use the ::: operator to reach the functions. The alternative is to duplicate the code verbatim in my package. This does not seem very sensible, especially since I would then need to track any changes to the aforementioned functions to remain in line. Here is the proposed patch against the current r-devel tree: Index: src/library/utils/NAMESPACE === --- src/library/utils/NAMESPACE (revision 78794) +++ src/library/utils/NAMESPACE (working copy) @@ -166,9 +166,9 @@ Sweave, SweaveSyntConv, SweaveSyntaxLatex, SweaveSyntaxNoweb, RtangleWritedoc, RweaveChunkPrefix, RweaveEvalWithOpt, RweaveTryStop, SweaveHooks, RweaveLatexWritedoc, - RweaveLatexOptions, RweaveLatexFinish, + RweaveLatexOptions, RweaveLatexFinish, RtangleFinish, .RtangleCodeLabel, - makeRweaveLatexCodeRunner) + makeRweaveLatexCodeRunner, RtangleRuncode) if(tools:::.OStype() == "unix") { export(nsl) Best, v. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Typo in Writing R Extensions
Hi, Just noticed this: on line 15296 of the current (master) R-exts.texi (section 7 of the compiled document), one reads would do most likely do different things, to the justifiable Either one of the "do" is in extra. Best, Vincent Goulet Université Laval __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Small typo in ?NumericConstants
Hi, I stumbled upon this small typo in ?base::NumericConstants: Index: library/base/man/NumericConstants.Rd === --- library/base/man/NumericConstants.Rd(révision 80490) +++ library/base/man/NumericConstants.Rd(copie de travail) @@ -47,7 +47,7 @@ A numeric constant immediately followed by \code{i} is regarded as an imaginary \link{complex} number. - An numeric constant immediately followed by \code{L} is regarded as an + A numeric constant immediately followed by \code{L} is regarded as an \code{\link{integer}} number when possible (and with a warning if it contains a \code{"."}). Best, v. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel