在没有脚本名称的情况下调用Rscript

时间:2016-11-25 06:04:33

标签: r rscript

我想在没有正确脚本的情况下调用Rscript,只需将其写入控制台即可。可能吗?

之类的东西
c:/path/to/R/bin/Rscript.exe "here is a R code, not a R file"

我在Windows上。

1 个答案:

答案 0 :(得分:1)

使用-e参数运行Rscript:

Rscript -e "getwd()"