Luca Scrucca
2014-May-20 06:51 UTC
[R] How to include static PDFs vignettes in an R package
Hi all, prior to R version 3.0 I used to include a static PDF file as package vignette following the instructions in http://www.icesi.edu.co/CRAN/web/packages/R.rsp/vignettes/NonSweaveVignettes.pdf (I know this is a little bit old), except that the relevant files where in vignette/ directory of the package and not on inst/doc/. This was recognized by the R build system, so the vignette appeared when calling browseVignettes() as well as in the 'Overview of user guides and package vignettes' section of the package HTML help page. However, this doesn't work anymore, and I have tried many different ways but with no success. Did someone find another solution to include static PDF files as vignettes in R packages? Thanks in advance. Luca -- -------------------------------------------------- Dr Luca Scrucca Department of Economics University of Perugia Via A. Pascoli, 20 06123 Perugia (ITALY) Tel. +39-075-5855229 Fax: +39-075-5855950 E-mail: luca at stat.unipg.it Web page: http://www.stat.unipg.it/luca
Duncan Murdoch
2014-May-20 11:02 UTC
[R] How to include static PDFs vignettes in an R package
On 20/05/2014, 2:51 AM, Luca Scrucca wrote:> Hi all, > > prior to R version 3.0 I used to include a static PDF file as package vignette following the instructions in http://www.icesi.edu.co/CRAN/web/packages/R.rsp/vignettes/NonSweaveVignettes.pdf (I know this is a little bit old), except that the relevant files where in vignette/ directory of the package and not on inst/doc/. > This was recognized by the R build system, so the vignette appeared when calling browseVignettes() as well as in the 'Overview of user guides and package vignettes' section of the package HTML help page. However, this doesn't work anymore, and I have tried many different ways but with no success. > Did someone find another solution to include static PDF files as vignettes in R packages? > Thanks in advance.You need to include the source, otherwise R doesn't consider it to be a vignette. If this package is for your own use (not for CRAN), the "source" could simply be an instruction to copy the .pdf from somewhere -- see the current non-Sweave vignettes section of Writing R Extensions for how to set this up. I don't think that would be acceptable on CRAN under their open source policy. Duncan Murdoch