[Rd] file.system() in packages

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jan 22 03:07:21 CET 2013

On 22/01/2013 01:33, robin hankin wrote:
> Hello.  R-devel, r61697.
> I am having difficulty interpreting section 1.4 "Writing package
> vignettes" of the R-exts manual.  Specifically, I want to use
> system.file() in some of my packages to locate a bib file,
> uncertainty.bib, which is part of the emulator package.  I only want
> to maintain a single .bib file.
> R-exts says: "All other files needed to re-make the vignette PDFs
> (such as ... BiBTeX input files) must in the vignette source
> directory".  So I've put my Rnw file and also the bib file in
> emulator/vignettes/ directory.
> And indeed, following R CMD build and then R CMD INSTALL on the
> tarball, I can see the Rnw file:
>> system.file("doc","emulex.Rnw",package="emulator")
> [1] "/home/rksh/Rd/lib64/R/library/emulator/doc/emulex.Rnw"
> so I know system.file() works as desired.  But I can't find
> uncertainty.bib as R CMD INSTALL does not copy it to the system:
>> system.file("doc","uncertainty.bib",package="emulator")
> [1] ""
> So I can't retrieve uncertainty.bib and this means that several other
> packages can't bibtex correctly.  Can anyone advise?

Read on:

'When R CMD build builds the vignette PDFs, it copies these and the 
vignette sources from directory vignettes to inst/doc. To install any 
other files from the vignettes directory, include a file 
vignettes/.install_extras which specifies these as Perl-like regular 
expressions on one or more lines. (See the description of the 
.Rinstignore file for full details.)'

> --
> Robin Hankin
> Uncertainty Analyst
> hankin.robin at gmail.com
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-devel mailing list