简体   繁体   English

R.exe、Rcmd.exe、Rscript.exe 和 Rterm.exe:有什么区别?

[英]R.exe, Rcmd.exe, Rscript.exe and Rterm.exe: what's the difference?

I'm struggling with the different R executables.我正在努力处理不同的 R 可执行文件。 What exactly is the difference between R.exe (with or without CMD BATCH option), Rcmd.exe, Rscript.exe and Rterm.exe when running command line in a batch file?在批处理文件中运行命令行时,R.exe(带或不带 CMD BATCH 选项)、Rcmd.exe、Rscript.exe 和 Rterm.exe 之间到底有什么区别?

And what is the difference between:之间有什么区别:

R.exe --no-environ --no-save < "c:\temp\R\test.R" > "c:\temp\R\out.txt" 2>&1

and

R.exe CMD BATCH --no-environ --no-save "c:\temp\R\test.R" "c:\temp\R\out.txt"

No difference in the output.输出没有区别。

I cannot find anything about Rcmd.exe and Rscript.exe in the 3079 pages R reference manual.我在 3079 页的 R 参考手册中找不到有关 Rcmd.exe 和 Rscript.exe 的任何信息。

By the way: I am using Windows.顺便说一句:我正在使用Windows。

Caveat: I work much more on Linux than Windows:警告:我在Linux上更多工作比Windows:

  • Rcmd.exe is a historical left-over as back in the day, you could not do R CMD something on Windows but needed the special executable Rcmd.exe something . Rcmd.exe是当时的历史遗留物,您无法在 Windows 上执行R CMD something ,但需要特殊的可执行Rcmd.exe something执行Rcmd.exe something That is no longer the case, yet it is provided for backwards compatibility.情况不再如此,但它提供了向后兼容性。
  • Rterm.exe is also a holdover from the days when Rcmd.exe was used. Rterm.exe也是使用Rcmd.exe时的Rcmd.exe物。 Can be ignored these days.这几天可以忽略。
  • R CMD BATCH is a crutch that was needed in the days before littler and Rscript.exe , and similarly lingering from old docs and habits.. R CMD BATCH是需要在以前的日子拐杖利特勒Rscript.exe ,并从旧文档和习惯同样挥之不去..
  • Rscript.exe is your friend for batch scripts; Rscript.exe是批处理脚本的朋友; use it.用它。
  • For everything else, there's R.exe .对于其他一切,还有R.exe

Other than that, as Marek hinted, the reference manual is the wrong one among the six available manuals.除此之外,正如马雷克所暗示的那样,参考手册是六本可用手册中的错误手册。 Try the Introduction to R and the Installation and Admin manuals both of which have specific appendices for Windows.尝试R 简介以及安装和管理手册,它们都有适用于 Windows 的特定附录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM