让Windows使用启动命令在批处理模式下启动 - [R [英] Getting windows to start R in batch mode using the Start command

查看:213
本文介绍了让Windows使用启动命令在批处理模式下启动 - [R的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我必须做一个简单的语法错误,但我想有一个触发了研发的9实例,并运行在每一个不同的例行Windows批处理文件。我希望这些能够同时运行(即异步)。我也火了9命令提示符窗口,并在每一个输入的命令,但似乎与START命令我应该能够让他们从一个单一的批处理文件中启动。

I know I must be making a simple syntax mistake, but I want to have a windows batch file that fires up 9 instances of R and runs a different routine in each one. I want these to run simultaneously (i.e. asynchronously). I can fire up 9 command prompt windows and type a command in each one, but it seems like with the START command I should be able to make them start from a single batch file.

下面就是我如何开始R的实例中的一个例子:

Here's an example of how I start one of the instances of R:

"C:\Program Files (x86)\R\R-2.8.1\bin\R" CMD BATCH "C:\Users\jd\Documents\mexico\Estado\getdata1.r"

阅读本<一个href=\"http://stackoverflow.com/questions/72671/how-to-create-batch-file-in-windows-using-start-with-a-path-and-command-with-sp\">$p$pvious与<一个计算器以及问题href=\"http://stackoverflow.com/questions/154075/using-the-dos-start-command-with-parameters-passed-to-the-started-program\">this previous问题让我觉得我应该能够做到这一点:

Reading this previous stackoverflow question along with this previous question makes me think I should be able to do this:

START "" "C:\Program Files (x86)\R\R-2.8.1\bin\R" CMD BATCH "C:\Users\jd\Documents\mexico\Estado\getdata1.r" /b

这不返回一个错误,它只是返回的提示和R永远不会发生。我缺少什么?

That does not return an error, it just returns a prompt and R never starts. What am I missing?

推荐答案

简单的答案。在Windows上运行的命令用病态造血不是R CMD时。目前运行的命令单独的EXE。看看你的R安装过程中的bin文件夹。

Simple answer. On windows when running command use "Rcmd" not "R CMD". There is a separate exe for running the commands. Look in the bin folder of your R installation.

这篇关于让Windows使用启动命令在批处理模式下启动 - [R的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆