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, ")")))
>>>>> Vincent Goulet via R-devel writes:Thanks: fixed now in the trunk with c78751. Best -k> 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 at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
Seemingly Similar Threads
- Bug report: R.home() cause package Rcpp failed executing sourceCpp, similar bug are labeled "BUG 16660" since 2016 and here I could provide a solution that tested in my laptop.
- Error in link in Rd file stops package installation
- R CMD check: Sys.getenv("R_GSCMD") cannot contain full pathname (contrary to docs)
- Bug in tools::compactPDF() in 2.13-0-alpha
- Development version of R: Improved nchar(), nzchar() but changed API