【发布时间】:2019-03-03 02:23:37
【问题描述】:
我在 Windows 10 上的系统路径中添加了以下内容:C:\Program Files\R\R-3.4.3\bin\x64
然后我尝试在 cmd 提示符下运行 ~:> R myscript.R
ARGUMENT 'example_batch.R' 忽略
它在没有任何执行的情况下进入交互式会话。
不知道它在this answer 中是如何工作的。我更喜欢这种简单的东西,就像在 Python 中一样。
以下作品R -e "source('myscript.R')"
但是当我需要它时,我永远不会记得它。
【问题讨论】:
-
我认为您正在寻找的是“Rscript.exe”。查看this post。
-
你能显示你的 myscript.R 文件吗
-
不要调用R.exe,调用Rscript:
Rscript myscript.R
标签: r command-line windows-10