# Re: [Rd] Vignette questions

From: Henrik Bengtsson <hb_at_biostat.ucsf.edu>
Date: Thu, 12 Apr 2012 14:55:15 -0700

To have a prebuilt/static PDF appear as package vignette in the help, browseVignettes(), and on CRAN, you can do:

1. Copy the PDF to inst/doc/, e.g. inst/doc/manual.pdf
2. Create a dummy inst/doc/manual.Rnw that contains four lines or LaTeX code:

%\VignetteIndexEntry{User manual}

\documentclass{article}
\begin{document}
\end{document}



>From Section 2.1 in

http://cran.r-project.org/web/packages/R.rsp/vignettes/NonSweaveVignettes.pdf

/Henrik

On Thu, Apr 12, 2012 at 1:07 PM, Yihui Xie <xie_at_yihui.name> wrote:
> If R-forge gives the warning, it is likely to be their configuration
> problem (they may be running R CMD check on the original source
> directory instead of the tarball), so it is better to report to
>
> I believe Terry is correct and it is a better practice *not* to put
> PDF vignettes under version control when they can be automatically
> generated.
>
> If vignettes are too complicated, I would suggest not to use vignettes
> in a package at all. You can put a fake vignette in the package and
> point to the real vignette elsewhere. You may see my knitr package for
> example: http://cran.r-project.org/package=knitr I have a dozen of
> real "vignettes" but they are not under ./inst/doc/ but under
> ./inst/examples/. They will not take CRAN any time to check or build,
> but I can use them to check if my package works fine on them locally.
> After I release a new version to CRAN, I build PDF vignettes and
> who do not want to build by themselves can download them directly.
>
> So l'd like to propose to free CRAN from the burdensome tasks of
> checkings if you can do it by yourself:
> http://yihui.name/knitr/demo/vignette/
>
> 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 Thu, Apr 12, 2012 at 9:42 AM, Paul Gilbert <pgilbert902_at_gmail.com> wrote:
>>
>>
>> Now I am not sure if I am confused or if you missed the "if it cannot be
>> built by R-forge and CRAN" part of my sentence. I understand that this is
>> done automatically by R CMD build for vignettes that can be built on all, or
>> most, R platforms. In the situation where R CMD build on R-forge will fail,
>> or not result in a complete vignette pdf, I think it is necessary to put a
>> good  pdf in inst/doc in order to get a build on R-forge that can be
>> submitted to CRAN. That is, in situations like:
>>
>>  -the vignette requires databases or drivers not generally available
>>  -the vignette (legitimately) takes forever to run
>>  -the vignette requires a cluster
>>
>> I am now wondering what the recommended practice is. What I have been doing,
>> which I thought was the recommended practice, is to put the vignette Rnw
>> (Stex) file in vignettes/ and put a pdf, constructed on a machine that has
>> appropriate resources, into inst/doc.  Is that the recommended way to
>> proceed?
>>
>> Related, some have commented that they put a pdf in inst/doc and then leave
>> out the vignette Rnw file to avoid error messages. Is the discouraged or
>> encouraged?
>>
>> Paul
>>
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 12 Apr 2012 - 21:58:25 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 13 Apr 2012 - 09:00:43 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.