Skip to content
Prev 222413 / 398500 Next

Wait for keystroke or timeout

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 error
messages that imply R is not finding or interpreting the command correctly.

As the details are arcane, please contact me off-line, and I'll report back to the list
when we have a solution.

However, if someone could try Matt's suggestion on a Mac and let me know outcome, that
would be helpful. Since .Platform allows me to determine OS type, I should be able to work
out a more or less platform-independent function.

JN
biostatmatt wrote: