Rev 16280 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{demo}\alias{demo}\title{Demonstrations of R functionality}\description{\code{demo} is a user-friendly interface to running some demonstration\R scripts. \code{demo()} gives the list of available topics.}\usage{demo(topic, device = getOption("device"),package = .packages(), lib.loc = .lib.loc,character.only = FALSE)}\arguments{\item{topic}{the topic which should be demonstrated. If omitted, thelist of available topics is displayed.}\item{device}{the graphics device to be used.}\item{package}{a name or character vector giving the packages tolook into for data sets. By default, all packages in the searchpath are used.}\item{lib.loc}{a character vector of directory names of \R libraries.Defaults to all libraries currently known. If the default is used,the loaded packages are searched before the libraries.}\item{character.only}{logical; if \code{TRUE}, use \code{topic} ascharacter string instead of name.}}\details{If no topics are given, \code{demo} lists the available demos. Thecorresponding information is returned in an object of class\code{"packageIQR"}. The structure of this class is experimental. Inearlier versions of R, an empty character vector was returned alongwith listing available demos.}\seealso{\code{\link{source}} which is called by \code{demo}.}\examples{% Most demos are strictly tested anyway, since R 1.3.0,% make sure, the others are run here:demo() # for attached packages## All available demos:demo(package = .packages(all.available = TRUE))demo(lm.glm)\testonly{demo(nlm)}\dontrun{ch <- "scoping"demo(ch, character = TRUE)}}\keyword{documentation}\keyword{utilities}