[R] Use of example()

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Oct 2 15:11:40 CEST 2000


> Date: Mon, 02 Oct 2000 08:53:32 -0400
> From: Art Salwin <salwin at mitretek.org>
> X-Accept-Language: en
> To: R Help List <r-help at stat.math.ethz.ch>
> Subject: [R] Use of example()
> X-MIMETrack: Itemize by SMTP Server on Mail1/Mitretek Systems(Release 5.0.4 
|June 8, 2000) at 10/02/2000 08:51:32 AM, Serialize by Router on Mail1/Mitretek 
Systems(Release 5.0.4 |June 8, 2000) at 10/02/2000 08:51:33 AM, Serialize 
complete at 10/02/2000 08:51:33 AM
> 
> I've been using R for several months, and just learned
> that example(topic) runs the example R code given in the
> help file
> for that topic.  Very nice feature!  However, I have a
> question:  when
> there's more than one example for a topic, each succeeding
> example
> overwrites the preceding ones on the screen, and so only the
> last
> one is visible.  Is there a way to overcome this by having
> the examples
> execute only one at a time or by having them write to
> different output
> screens?

That's not a feature of example per se, but applies to all R output.  I
presume that you mean the graphics output, as the text output is
scrollable (if you use the Windows GUI or a scrollable terminal).  Try 
par(ask=TRUE) to get the graphics to pause before each graph.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list