Input data interactively into R

To input data interactively into R, use the function readline:

x <- readline("What is your answer? ")
comments powered by Disqus