6

My R package vignette uses tikz/pgf graphics. The R CMD check command throws an error message on operating systems where the LaTeX package tikz/pgf is not installed. On a vanilla Ubuntu system, for example, the Ubuntu package 'pgf' must be installed for R CMD check to complete without an error message. The CRAN servers seem to have tikz/pgf installed, but I cannot make sure this is always and everywhere the case. Is there any way I can add a dependency on pgf to the DESCRIPTION file of my R package? Can I just add it to the 'Depends' field (even though it is not an R package)? I would not like to trash the diagram because the package vignette is an article that was published in the Journal of Statistical Software, and I would like to use it as a vignette without any modification.

Sam
  • 7,252
  • 16
  • 46
  • 65
Philip Leifeld
  • 2,253
  • 15
  • 24

1 Answers1

4

From http://cran.r-project.org/doc/manuals/R-exts.html#The-DESCRIPTION-file :

Other dependencies (external to the R system) should be listed in the ‘SystemRequirements’ field, possibly amplified in a separate README file.

There won't be any automatic check or informative error message generated by the R installation process, but at least the information will be stored in a consistent place ...

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453
  • Thanks. So how would I add this to the SystemRequirements field? Would I write ``pgf``? Or ``tikz/pgf``? Or would I add a hint that this is a LaTeX package? – Philip Leifeld Sep 28 '13 at 09:03
  • I think it's free-form. Googling finds examples like "SystemRequirements: WinBUGS 1.4"; "SystemRequirements: Gnu Scientific Library version >= 1.12". – Ben Bolker Sep 28 '13 at 12:27