[Rd] Precompiled vignette on CRAN

Martin Morgan mtmorgan at fhcrc.org
Wed Jul 14 23:12:38 CEST 2010


On 07/14/2010 01:04 PM, Prof Brian Ripley wrote:
> On Wed, 14 Jul 2010, Felix Schönbrodt wrote:
> 
>> Hello,
>>
>> my package passes R CMD check without any warnings on my local machine
>> (Mac OS), as well as on Uwe Ligges' Winbuilder. On RForge, however, we
>> sometimes run into problems building the Sweave vignettes.
> 
> Just 'problems' is not helpful.
> 
>> Now here's my question: is it necessary for a CRAN submission that the
>> Sweave vignettes can be compiled on CRAN, or is it possible to provide
>> the (locally compiled) pdf vignette to be included in the package?
> 
> This really is a question to ask the CRAN gatekeepers, but people are on
> vacation right now, so I've give some indication of my understanding.
> 
> What does 'compiled' mean here?  (Run through LaTeX?  Run the R code?)
> There are examples on CRAN of packages which cannot re-make their
> vignettes without external files (e.g. LaTeX style files), or take hours
> (literally) to run the code.  The source package should contain the PDF
> versions of the vignettes as made by the author.
> 
> There is relevant advice in 'Writing R Extensions'.

While on this topic, how are non-Sweave files to be made accessible to
browseVignettes() and help(package=...)?

At one point 00Index.dcf files could be used to influence index
creation, and Writing R Extensions indicates that an inst/doc/index.html
file can also be used. The 00Index.dcf approach seems better (no need
for the user to track the appropriate html structure of R's help pages),
but regardless it seems 00Index.dcf is ignored (stronger than 'no longer
necessary' in Writing R Extensions) and index.html does not influence
what is displayed by help(package='...') or browseVignettes().

I'm basing this on the 'limma' package (which seems to have tried to be
a good citizen, with 00Index.dcf and index.html files) and running R in
a console with

> getOption('help_type')
NULL
> sessionInfo()
R version 2.12.0 Under development (unstable) (2010-07-14 r52526)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] limma_3.5.12

Martin


> 
> What the people who do the CRAN package checks do get unhappy about are
> packages which fail running the R code in their vignettes, since this
> often indicates a problem in the package which is not exercised by the
> examples nor tests.  This gives a warning, as you will see in quite a
> few CRAN package checks.
> 
> 
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel


-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the R-devel mailing list