Ff Yy Ff Yy -4 years ago 126
R Question

In R is there some function like raw_input() in python?

In Python, we can use

raw_input()
, what can I use in R?

>>> raw_input("let x=3 or 4?")
let x=3 or 4?3
'3'

Answer Source

Try readline():

> input = readline('Enter anything: ')
Enter anything: test
> input
[1] "test"
> 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download