[R-pkg-devel] Where do demos fit in?
peter.carbonetto at gmail.com
Fri Oct 20 22:11:43 CEST 2017
Re-using demos for your package tests is a great idea, and should be done
However, I tend to agree with Iñaki---I generally prefer vignettes to demos.
I wanted to point out that you could take a similar strategy to what you
suggested, but using a vignette instead of a demo. The code is slightly
more complicated but seems to work. See here for an example:
(Anyone, please reply if you know of a better way to implement this!)
On Fri, Oct 20, 2017 at 1:18 AM, Iñaki Úcar <i.ucar86 at gmail.com> wrote:
> 2017-10-20 5:42 GMT+02:00 Neal Fultz <nfultz at gmail.com>:
> > A graduate student just asked me (copied below), in response to a bug I
> > wrote (
> > https://github.com/DeclareDesign/estimatr/pull/38/commits/
> > ):
> > How do demos normally relate to tests and vignettes? Is the purpose
> >> to have manually run tests that check the things work in the global
> >> environment?
> There is a good definition and description here:
> Personally, I'm not a fan of demos, because I prefer to copy&paste
> from vignettes as I read and understand the different parts of the
> problem in question.
> R-package-devel at r-project.org mailing list
[[alternative HTML version deleted]]
More information about the R-package-devel