[R] Demo files in R packages

Michael L Friendly |r|end|y @end|ng |rom yorku@c@
Sat Jan 24 22:49:28 CET 2026


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]]



More information about the R-help mailing list