[Rd] file.system() in packages

robin hankin hankin.robin at gmail.com
Tue Jan 22 02:33:40 CET 2013


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?


--
Robin Hankin
Uncertainty Analyst
hankin.robin at gmail.com



More information about the R-devel mailing list