如何在 Windows 7 上创建 Rscript 的快捷方式 [英] How to create shortcut to Rscript on Windows 7
问题描述
我创建了一个 Windows 7 快捷方式,试图让不熟悉 R 的人能够运行一个简单的程序.我试图遵循其他帖子的建议,但一定是遗漏了一些东西.这就是我现在的快捷方式.
I have created a Windows 7 shortcut in an attempt to give someone who is not comfortable with R the ability to run a simple program. I have tried to follow the advice of other postings, but must be missing something. This is what I have in my shortcut right now.
目标:"C:\Program Files\R\R-3.0.2\bin\x64\Rscript.exe" --vanilla -e "C:\Users\Moo\Desktop\CharCalendar.r"
开始于:"C:\Program Files\R\R-3.0.2\bin\x64"
我收到错误消息(在黑色 DOS 窗口上非常短暂地闪现),内容如下 Error 在C:\"中出现意外输入
I get error messages (that flash up very briefly on a black DOS window) that say things like Error unexpected input in "C:\"
我尝试在目标中使用和不使用引号,我尝试在目标中使用 source()(也使用和不使用引号).
I have tried with and without quotes in the target, I have tried using source() in the target (also with and without quotes).
当我在 R 控制台中提交脚本时,脚本运行没有错误.
The script runs without error when I submit it in the R console.
推荐答案
你可能想要
"C:\Program Files\R\R-3.0.2\bin\x64\Rscript.exe" --vanilla C:\Users\Moo\Desktop\CharCalendar.r
作为你的目标.没有 -e
;指定要运行的表达式,而不是脚本文件.
as your target. No -e
; that specifies an expression to run, not a script file.
这篇关于如何在 Windows 7 上创建 Rscript 的快捷方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!