demo {base} | R Documentation |
demo
is a user-friendly interface to running some demonstration
R scripts. demo()
gives the list of available topics.
demo(topic, device = getOption("device"),
package = .packages(), lib.loc = NULL,
character.only = FALSE, verbose = getOption("verbose"))
topic |
the topic which should be demonstrated. If omitted, the list of available topics is displayed. |
device |
the graphics device to be used. |
package |
a name or character vector giving the packages to look into for data sets. By default, all packages in the search path are used. |
lib.loc |
a character vector of directory names of R libraries,
or |
character.only |
logical; if |
verbose |
a logical. If |
If no topics are given, demo
lists the available demos. The
corresponding information is returned in an object of class
"packageIQR"
. The structure of this class is experimental. In
earlier versions of R, an empty character vector was returned along
with listing available demos.
source
which is called by demo
.
demo() # for attached packages
## All available demos:
demo(package = .packages(all.available = TRUE))
demo(lm.glm)
## Not run:
ch <- "scoping"
demo(ch, character = TRUE)
## End(Not run)