[Rd] CRAN: How to list a non-Sweave doc under "Vignettes:" on package page?

Michael Friendly friendly at yorku.ca
Mon Nov 7 23:22:27 CET 2011


On 11/6/2011 7:41 PM, Henrik Bengtsson wrote:
> Hi,
>
> is it possible to have non-Sweave vignettes(*) in inst/doc/ be listed
> under 'Downloads' on CRAN package pages?  For instance, in my R.rsp
> package I have a inst/doc/report.pdf (part of the source *.tar.gz)
> that is not detected/listed.  The PDF is not based on a Sweave
> vignette but an *.tex.rsp vignette that is dynamically created via
> inst/doc/Makefile.  It is listed
>
> (*) BTW, can the term "vignette" be used for any inst/doc/ document,
> or should it be reserved for Sweave+LaTeX-based documents?
>

I have a related problem/question and a request to R-Core to consider 
relaxing the requirements for vignettes when, for one reason or another,
they cannot be built entirely via Sweave.  In such cases, perhaps 
package authors can provide alternative metadata in the form of an
00index.html or something similar to allow such vignettes to be
more visible.

Those who face this problem would then be able to figure out a
Makefile or manual way to maintain the metadata file. What would be
required to implement this?

In my case, my Guerry package has a vignette, inst/doc/MultiSpat.pdf, 
originally built entirely with Sweave.  However, the vignette require()d 
a package only on R-Forge, which the author does not wish
to release to CRAN.  At some point, ~ R 2.10, this triggered a 
WARNING/ERROR from the CRAN check daemon, in spite of the fact that the
vignette .Rnw file contained the following hack designed to make sure 
that all necessary packages were available anywhere:

\subsection{Installation and loading of required packages}
Several packages must be installed to run the different analyses:
<<ni0, fig=F, eval=TRUE, echo=TRUE, debug=TRUE, results=hide, include 
=FALSE, width=7, height=7>>=
pkg <- c("maptools","spdep","ade4","Guerry","spacemakeR")
inst.pkg <- row.names(installed.packages())
pkg2inst <- pmatch(pkg,inst.pkg)
if(any(is.na(pkg2inst[1:4]))) 
install.packages(pkg[which(is.na(pkg2inst[1:4]))],repos="http://cran.at.r-project.org")
if(is.na(pkg2inst[5]))
   install.packages("spacemakeR", repos="http://R-Forge.R-project.org")

library(maptools)
library(ade4)
library(spdep)
library(spacemakeR)
library(Guerry)
@

However, this hack was deemed unacceptable for a CRAN package vignette.
In the end, the only solution that would satisfy the CRAN check daemon 
was to delete the source inst/doc/MultiSpat.Rnw file from the package.

Consequently, the .pdf vignette remains in the package, but it is not 
listed as a vignette on CRAN, nor found via vignette()

best,
-Michael


-- 
Michael Friendly     Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University      Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street    Web:   http://www.datavis.ca
Toronto, ONT  M3J 1P3 CANADA



More information about the R-devel mailing list