[R-pkg-devel] Suppressing long-running vignette code in CRAN submission
Henrik Bengtsson
henr|k@bengt@@on @end|ng |rom gm@||@com
Tue Oct 17 21:50:07 CEST 2023
On Tue, Oct 17, 2023 at 12:45 PM John Fox <jfox using mcmaster.ca> wrote:
>
> Hello Dirk,
>
> Thank you for the additional information.
>
> As you suggest, what you did to distribute pre-built PDF vignettes is
> quite similar to what R.rsp does, except that the latter also supports
> pre-built HTML vignettes, which is what I'd prefer to distribute. Since
Author of R.rsp here: It supports both static PDFs and static HTMLs, cf.
https://cran.r-project.org/web/packages/R.rsp/vignettes/R_packages-Static_PDF_and_HTML_vignettes.pdf
/Henrik
> I apparently have that working now, we'll probably go with it unless we
> hit snags when the package is sent to CRAN.
>
> While I appreciate the offer, it's probably not necessary for you to
> spend more time on this now.
>
> Thanks again,
> John
>
> On 2023-10-17 3:19 p.m., Dirk Eddelbuettel wrote:
> > Caution: External email.
> >
> >
> > John,
> >
> > On 17 October 2023 at 10:02, John Fox wrote:
> > | Hello Dirk,
> > |
> > | Thank you (and Kevin and John) for addressing my questions.
> > |
> > | No one directly answered my first question, however, which was whether
> > | the approach that I suggested would work. I guess that the implication
> > | is that it won't, but it would be nice to confirm that before I try
> > | something else, specifically using R.rsp.
> >
> > I am a little remote here, both mentally and physically. What I might do here
> > in the case of your long-running vignette, and have done in about half a
> > dozen packages where I wanted 'certainty' and no surprises, is to render the
> > pdf vignette I want as I want them locally, ship them in the package as an
> > included file (sometimes from a subdirectory) and have a five-or-so line
> > Sweave .Rnw file include it. That works without hassles. Here is the Rnw I
> > use for package anytime
> >
> > -----------------------------------------------------------------------------
> > \documentclass{article}
> > \usepackage{pdfpages}
> > %\VignetteIndexEntry{Introduction to anytime}
> > %\VignetteKeywords{anytime, date, datetime, conversion}
> > %\VignettePackage{anytime}
> > %\VignetteEncoding{UTF-8}
> >
> > \begin{document}
> > \includepdf[pages=-, fitpaper=true]{anytime-intro.pdf}
> > \end{document}
> > -----------------------------------------------------------------------------
> >
> > That is five lines of LaTeX code slurping in the pdf (per the blog post by
> > Mark). As I understand it R.rsp does something similar at the marginal cost
> > of an added dependency.
> >
> > Now, as mentioned, you can also 'conditionally' conpute in a vignette and
> > choose if and when to use a data cache. I think that we show most of that in
> > the package described in the RJournal piece by Brooke and myself on drat for
> > data repositories. (We may be skipping the compute when the data is not
> > accessible. Loading a precomputed set is similar. I may be doing that in the
> > much older never quite finished gcbd package and its vignette.
> >
> > Hope this helps, maybe more once I am back home.
> >
> > Cheers, Dirk
> >
> > | Best,
> > | John
> > |
> > | On 2023-10-17 4:02 a.m., Dirk Eddelbuettel wrote:
> > | > Caution: External email.
> > | >
> > | >
> > | > On 16 October 2023 at 10:42, Kevin R Coombes wrote:
> > | > | Produce a PDF file yourself, then use the "as.is" feature of the R.rsp
> > | > | package.
> > | >
> > | > For completeness, that approach also works directly with Sweave. Described in
> > | > a blog post by Mark van der Loo in 2019, and used in a number of packages
> > | > including a few of mine.
> > | >
> > | > That said, I also used the approach described by John Harrold and cached
> > | > results myself.
> > | >
> > | > Dirk
> > | >
> > | > --
> > | > dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
> > | >
> > | > ______________________________________________
> > | > R-package-devel using r-project.org mailing list
> > | > https://stat.ethz.ch/mailman/listinfo/r-package-devel
> > |
> >
> > --
> > dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
More information about the R-package-devel
mailing list