Re: [R] Wait for keystroke or timeout

2010-05-28 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Prof. John C Nash > Sent: Friday, May 28, 2010 7:46 AM > Cc: r-help@r-project.org > Subject: Re: [R] Wait for keystroke or timeout > > Matt's sug

Re: [R] Wait for keystroke or timeout

2010-05-28 Thread Greg Snow
ilto:r-help-boun...@r- > project.org] On Behalf Of Prof. John C Nash > Sent: Thursday, May 27, 2010 5:09 PM > To: r-help@r-project.org > Subject: [R] Wait for keystroke or timeout > > I would like to have a function that would wait either until a > specified timeout (in > seco

Re: [R] Wait for keystroke or timeout

2010-05-28 Thread Prof. John C Nash
Matt's suggestion works in Linux (I use Ubuntu and Debian variants), but I haven't yet been able to get it to work in Windows. In a DOS terminal, I can run Cygwin's blas.exe via blas -c "read -t 1 -n 1" and get the right functioning, but when embedded in R in various ways, I get several err

Re: [R] Wait for keystroke or timeout

2010-05-27 Thread biostatmatt
On Thu, 2010-05-27 at 19:08 -0400, Prof. John C Nash wrote: > I would like to have a function that would wait either until a specified > timeout (in > seconds preferably) or until a key is pressed. I've found such a function > quite useful in > other programming environments in setting up dialogs

Re: [R] Wait for keystroke or timeout

2010-05-27 Thread biostatmatt
On Thu, 2010-05-27 at 19:08 -0400, Prof. John C Nash wrote: > I would like to have a function that would wait either until a specified > timeout (in > seconds preferably) or until a key is pressed. I've found such a function > quite useful in > other programming environments in setting up dialo

[R] Wait for keystroke or timeout

2010-05-27 Thread Prof. John C Nash
I would like to have a function that would wait either until a specified timeout (in seconds preferably) or until a key is pressed. I've found such a function quite useful in other programming environments in setting up dialogs with users or displaying results, rather like a timed slideshow that