[R] interactive prompts

Barry Rowlingson B.Rowlingson at lancaster.ac.uk
Mon Oct 20 14:01:45 CEST 2003


>>Am using R on a Linux box and am currently writing an interactive R script.
>>
>>1. How do I ask a user to press any key to continue ? I used a system call to 
>>read but this only works if the Enter key is pressed:
>>  print("Press any key to continue")
>>  system("read")

  If you want to do something prettier, you can use the tcltk library 
and have little dialog boxes, input boxes, menus, etc.

  If you do, then could you also write some nice documentation for how 
to do it in R, since the R docs refer you to the Tcl/Tk docs, and you 
end up having to back-translate everything to R. Or is there a nice 
R-TclTk guide somewhere that I've not found yet?

Baz




More information about the R-help mailing list