[R] user input

Ivan Calandra ivan.calandra at uni-hamburg.de
Wed Apr 20 11:00:36 CEST 2011

Dear users,

I have looked on different sources and found different functions to 
prompt the user to provide input. However, I couldn't find one that does 
exactly what I'm looking for.

select.list() and menu() are nice because a graphic window appears to 
prompt the user. However, the user can only choose from a predefined 
list of choices. readline() and scan() are more free in the input but 
prompt the user in the console.

a <- select.list(choices=c("0.0","0.1","0.2"), title="select number")
a    ## I cannot choose "0.15"
[1] "0.1"

b <- readline(prompt="select number ")
select number 0.2    ## in the console, not really visible
[1] "0.2"

I would like both "free" input and a pop-up window. Is there a function 
for this?

Thanks in advance,

PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum
Abt. Säugetiere
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calandra at uni-hamburg.de


More information about the R-help mailing list