有什么包或者函数可以实现下面的功能:

#this is a R script

print('please put in a number:')

a <- get() # 就是在运行程序时,等待用户输入!像 C,python,java中就有。get 是我瞎写的...

回复 第2楼 的 Ihavenothing:非常感谢,回复的这么快。。。

回复 第2楼 的 Ihavenothing:不能输入字符串...只可以数字??

回复 第4楼 的 wnfd:解决了,没好好看scan的选项...

就这么简单:a <- scan(what = character(0))