Demo files in R packages
Michael L Friendly <[email protected]> Sat, 24 Jan 2026 21:49:28 +0000
| Newsgroups | gmane.comp.lang.r.general |
|---|---|
| Message-ID | <YQBPR0101MB4652F0D9CE3D612171B11C7CAB95A@YQBPR0101MB4652.CANPRD01.PROD.OUTLOOK.COM> |
Before vignettes were established as a way to document a package, there were demos, R files in a `demo/` folder with a `demo/00-Index` file giving their contents.
Used as `demo(package="...")` this gave a window with a list and titles, and `demo("example1", package="...") ran `demo/example1.R` in the console.
It was also a good way to give a pointer to something more extensive than you wanted to include in the examples for a function or dataset.
This idea still works for R packages, but is not available for use in roxygen2 documentation, or pkgdown sites.
I have several packages with collections of demo/ files, and am wondering if there is anything further I can do with them to make them accessible.
thx,
-Michael
---
Michael Friendly Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University Voice: 416 736-2100 x66249
4700 Keele Street Web: http://www.datavis.ca<http://www.datavis.ca/> | @datavisFriendly
Toronto, ONT M3J 1P3 CANADA
[[alternative HTML version deleted]]