[R-pkg-devel] vignette with "Run Examples"

Deepayan Sarkar deep@y@n@@@rk@r @end|ng |rom gm@||@com
Tue Dec 12 08:50:56 CET 2023


On Tue, 12 Dec 2023 at 12:54, Sigbert Klinke <sigbert using wiwi.hu-berlin.de>
wrote:

> Hi,
>
> is it possible to get a button or link to run an example in a vignette
> like we see for the examples in the R help?
>

Just to understand your expectations: The 'run examples' option only works
within the "dynamic" R help system, because it has access to a running
version of R. Vignettes can also be viewed through the dynamic system, but
they perhaps more useful as standalone documentation (say on the CRAN page
of a package). Would it be really useful to be able to run the code only in
the limited setup of dynamic help?

The other issue is that examples are expected to be short and simple,
whereas vignettes can often be more complicated. They will also typically
include the "output" from running the code, so what would be the point of
running it again?

If you want to really try the vignette code, then the package documentation
page typically includes the R code extracted from a vignette, which you can
download and run. And of course with IDEs like ESS or RStudio, you can
simply open the vignette source and run the code interactively.

Best,
-Deepayan


>
> Thanks Sigbert
>
> --
> https://hu.berlin/sk
> https://www.stat.de/faqs
> https://hu.berlin/mmstat
> https://hu.berlin/mmstat-ar
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list