From ripley@stats.ox.ac.uk  Wed Jun 21 19:20:58 2000
From: ripley@stats.ox.ac.uk (Prof Brian D Ripley)
Date: Wed, 21 Jun 2000 19:20:58 +0100 (BST)
Subject: [Rd] OS calls
In-Reply-To: <3950F0EA.413B6DF3@bank-banque-canada.ca>
Message-ID: <Pine.GSO.4.05.10006211917210.20797-100000@auk.stats>

On Wed, 21 Jun 2000, Paul Gilbert wrote:

> P.S.
> >> sleep <- function(n) {system.call(paste("sleep ", n))} # pause for n seconds
> 
> >That's on my TODO list (but allowing sub-sec accuracy). KH suggested that
> >we hide names like that behind a .Sys call (but then he introduced getwd).
> >There is already at least one object called sleep (a dataset) in an R
> >package.
> 
> Changing these names is fine with me.

BTW, your sleep function is a really bad idea in a GUI environment (GNOME
or tcltk or even an X11 graphics device) as it blocks all GUI events.  The
version I use for the Windows port of xgobi sleeps for 500ms, then wakes up
and handles Windows events, goes back to sleep .... S-PLUS runs its
graphics devices (on Unix) in separate processes, but R does not.

-- 
Brian D. Ripley,                  ripley@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-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] OS calls
Prof Brian D Ripley