Skip to content

[R-pkg-devel] License of pre-built vignettes

8 messages · Helmut Schütz, Thierry Onkelinx, Duncan Murdoch +3 more

#
Dear all, since we have many examples in our vignettes (rendering takes 
about 7 minutes) we provide them in /inst/doc Another reason is to have 
HTML5 instead of XHTML1.0 produced by pandoc (which contains deprecated 
attributes). To prevent building we have BuildVignettes: no in the 
DESCRIPTION Building the source, and installation from the local zip 
works as intended (vignettes are listed by 
browseVignettes(package="ourpackage"), linked in the main man-page, and 
all internal links are fine. However, CHECK throws a WARNING FOSS 
licence with BuildVignettes: false If I understand that correctly, it 
means that license(s) could not retrieved. In the DESCRIPTION we have 
License: GPL (>=2) Furthermore, all vignettes have a license section We 
tried adding License_is_FOSS: yes and License_restricts_use: no to the 
DESCRIPTION without success. Any ideas? Helmut
#
On 24/10/2019 8:57 a.m., Helmut Sch?tz wrote:
Writing R Extensions says that "BuildVignettes: false" should only be 
used in packages which do not have an open source license.

The CRAN Repository Policy says "If the package needs special treatment 
(for example if vignettes can only be run or re-built on the 
maintainer?s machine or take a very long time), say so on the submission 
form."

So it seems clear what to do:  remove the BuildVignettes: false 
statement, and explain why CRAN should avoid building them in your 
submission message.  This will likely make it take longer for the 
package to be handled; if that's a problem for you, you probably need to 
simplify the examples (or remove them).

Duncan Murdoch
#
Dear Duncan,

Duncan Murdoch wrote on 2019-10-24 21:51:
THX, I got the idea. However, if we remove BuildVignettes: false, in the 
tarball the HTML5 vignettes in inst/doc are overwritten with pandoc's 
XHTML1.0 (with a warning, of course). That's the opposite of what we want.

The vignettes contain code for simulations which causes the long 
runtime. In examples of the man-pages we have -- much simpler ones -- in 
\donttest{}. I think that one of the purposes of vignettes is to give 
the user a more exhaustive description what can be done with certain 
functions. The only way out would to have instead of the R-code plain 
text. Runtimes close to zero but all -- rather useful -- formats lost.

We will try to keep them and start a discussion with the team.

Helmut
#
Dear Helmut,

Maybe you can move your vignettes (source and rendered version) to the inst
folder. I think that this makes the files available to the user without
being recompiled. Downside it that they are no longer recognised as
vignettes. Therefore I would also add a short overview vignette describing
and linking to the precompiled vignettes. Something like
browseURL(system.file("precompiled.html", package = "yourpackage"))

Best regards,

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx at inbo.be
Havenlaan 88 bus 73, 1000 Brussel
www.inbo.be

///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////

<https://www.inbo.be>


Op vr 25 okt. 2019 om 01:17 schreef Helmut Sch?tz <helmut.schuetz at bebac.at>:

  
  
#
On 24/10/2019 7:16 p.m., Helmut Sch?tz wrote:
Base R doesn't use pandoc, so you are presumably using rmarkdown or some 
other contributed package.  You should either get that package to modify 
the way it produces the vignette, or write your own vignette building 
code (which would encapsulate whatever process you are currently using). 
  I think the former would be easier:  rmarkdown is very flexible.  You 
may just need to modify the pandoc template that it is using and you'll 
get the format you want.

Duncan Murdoch
#
You could also consider a static vignette withh R.rsp:
https://cran.r-project.org/web/packages/R.rsp/vignettes/R_packages-Static_PDF_and_HTML_vignettes.pdf

Berry


________________________________

  
  
#
Adding a static PDF vignette is very easy. I have written about it here:
http://www.markvanderloo.eu/yaRb/2019/01/11/add-a-static-pdf-vignette-to-an-r-package/

Best,
Mark

Op vr 25 okt. 2019 13:22 schreef Berry Boessenkool <
berryboessenkool at hotmail.com>:

  
  
#
On 25 October 2019 at 22:45, Mark van der Loo wrote:
| Adding a static PDF vignette is very easy. I have written about it here:
| http://www.markvanderloo.eu/yaRb/2019/01/11/add-a-static-pdf-vignette-to-an-r-package/

And I am doing just that for more and more packages of mine.

It is "wrong" in the sense Mark also alluded elsewhere but also "right"
as it removes variability we sometimes cannot control (changes in
vignette-processing packages fundamentally unrelated to your package,
continued absence of e.g. latex style files on various build machines
such as different rhub flavours) and generally speeds up builds.

As with other things: a trade-off the package maintainer can decide.

Dirk