Henrik Bengtsson
2011-Nov-07 00:41 UTC
[Rd] CRAN: How to list a non-Sweave doc under "Vignettes:" on package page?
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? Thanks Henrik
Yihui Xie
2011-Nov-07 01:14 UTC
[Rd] CRAN: How to list a non-Sweave doc under "Vignettes:" on package page?
I have the same question. I wish vignettes which are shown in CRAN and the package documentation are not restricted to Sweave (or I missed something in the R-exts manual?). What I did in the past was to cheat Sweave by putting an Rnw document which is essentially a tex document (I used my own functions to compile Rnw to tex). Regards, Yihui -- Yihui Xie <xieyihui at gmail.com> Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sun, Nov 6, 2011 at 6:41 PM, Henrik Bengtsson <hb at biostat.ucsf.edu> 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? > > Thanks > > Henrik > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >
Michael Friendly
2011-Nov-07 22:22 UTC
[Rd] CRAN: How to list a non-Sweave doc under "Vignettes:" on package page?
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
Berwin A Turlach
2011-Nov-08 03:36 UTC
[Rd] CRAN: How to list a non-Sweave doc under "Vignettes:" on package page?
G'day Henrik, On Sun, 6 Nov 2011 16:41:22 -0800 Henrik Bengtsson <hb at biostat.ucsf.edu> wrote:> is it possible to have non-Sweave vignettes(*) in inst/doc/ be listed > under 'Downloads' on CRAN package pages?As far as I know, only by a little trick. Create an Sweave based vignette that uses the pdfpages package to include the .pdf file that you want to have listed. This dummy vignette should then be listed on CRAN. See the lasso2 package for an example. The vignette in inst/doc/ in that package is actually a bit more complicated than necessary. As I think there is no point of having two nearly identical copies of PDF files in a package, I use .buildignores to have the original PDF file not included in the source package. This started to create a problem when R decided to rebuild vignettes during the checking process and pdfpages decided to hang if the PDF file to be included was missing. HTH. Cheers, Berwin
Seemingly Similar Threads
- vignettes: .png graphics or pre-compiled .pdf
- Changing style for the Sweave vignettes
- packages with Sweave and knitr vignettes?
- Compatibility with R 2.15.x: Makefile for (non-Sweave) vignettes in vignettes/?
- Suggestion: Custom filename patterns for non-Sweave vignettes