On Mon, Nov 4, 2013 at 12:46 PM, Dan Tenenbaum <dtene...@fhcrc.org> wrote: > > > ----- Original Message ----- >> From: "Tim Triche, Jr." <tim.tri...@gmail.com> >> To: bioc-devel@r-project.org >> Sent: Monday, November 4, 2013 12:25:19 PM >> Subject: [Bioc-devel] disappearing .tex file when running R CMD Sweave on a >> new vignette >> >> I get a bizarre error when compiling a newly-added Methylumi >> vignette: >> >> 10 : echo keep.source term verbatim (label = sessioninfo, >> methylumi450k.Rnw:136) >> Error in driver$finish(drobj) : >> the output file 'methylumi450k.tex' has disappeared >> Calls: <Anonymous> -> do.call -> <Anonymous> -> <Anonymous> >> Execution halted >> >> This is bizarre because 1) the file is still there, and 2) all the >> heavy >> lifting is done. >> >> sessionInfo(), etc. is included properly and the vignette concludes >> with >> \end{document}, but nothing I do seems to resolve this driver error. >> >> Any suggestions would be most appreciated. >> > > Probably has to do with calling setwd() in the vignette? Maybe you need an > on.exit() that restores the original directory. My guess is that you changed > directory and then R can't see the tex file because it's in a different > directory. See > http://stackoverflow.com/questions/12162092/r-sweave-output-error
tools::buildVignettes(), which is used by 'R CMD build', tries to protect against this by always resetting the working directory after weave:ing and tangle:ing a vignette, cf. http://svn.r-project.org/R/trunk/src/library/tools/R/Vignettes.R. tools::buildVignette() [no plural 's'], which is used by 'R CMD Sweave' (which is what Tim uses), should also do this, but looking at the code, this may only work properly if argument 'dir' is an absolute path, which it may not be the case (not sure). I've just submitted a bug report PR#15530 [https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=15530] with a patch on this. There may also be related issues in the utils::Sweave drivers (looks like code running during garbage collection) - I'll let someone else look into that. But, undoing setwd():s in the vignette should solve this, iff that's what behind this in the first place. /Henrik > > Dan > > >> Thanks, >> >> --t >> >> >> *He that would live in peace and at ease, * >> *Must not speak all he knows, nor judge all he sees.* >> >> Benjamin Franklin, Poor Richard's >> Almanack<http://archive.org/details/poorrichardsalma00franrich> >> >> [[alternative HTML version deleted]] >> >> _______________________________________________ >> Bioc-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/bioc-devel >> > > _______________________________________________ > Bioc-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/bioc-devel _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel