关于r:在没有脚本名称的情况下调用Rscript rrscript invoke Rscript without a script name 我想在没有适当脚本的情况下调用Rscript,只需在控制台中编写它即可。 可能吗? 就像是 1c:/path/to/R/bin/Rscript.exe"here is a R code, not a R file" 我在Windows上。 相关讨论 是的,有一个-e参数。 例如尝试:Rscript -e"{a<-1:10;print(a)}"。 如果您可以将此添加为答案,我会批准 使用-e参数运行Rscript: 1Rscript -e"getwd()"