elp-boun...@r-project.org [mailto:r-help-boun...@r-
>> project.org] On Behalf Of Kohleth Chia
>> Sent: Wednesday, November 24, 2010 5:53 AM
>> To: r-help@r-project.org
>> Subject: [R] Getting user input without hitting enter
>>
>> Hi,
>>
>> I am writin
Healthcare
greg.s...@imail.org
801.408.8111
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of Kohleth Chia
> Sent: Wednesday, November 24, 2010 5:53 AM
> To: r-help@r-project.org
> Subject: [R] Getting user input wit
Hi,
I am writing a function which requires user to enter a single character.
Something like:
hello<-function(){
input<-scan(n=1,what="a")
if(input=="h")cat("Hello") # What goes after the 'if' is completely
arbitrary, for simplicity sake I simply put a cat command here.
}
I want
3 matches
Mail list logo