Launching executable file in R


#1

Hello,

I am appologizing in the beginning if this problem has been already discussed.
I am new to R and R studio. I need to run an exe file from R and finally need R to process those results for further analysis. I am using windows 7. Kindly help me out of this.


#2

You should use system

https://stat.ethz.ch/R-manual/R-devel/library/base/html/system.html


#3

Or system2, which is preferable in many cases.

Differences are:

Unlike system, command is always quoted by shQuote, so it must be a single command without arguments.

system2 is a more portable and flexible interface than system. It allows redirection of output without needing to invoke a shell on Windows, a portable way to set environment variables for the execution of command, and finer control over the redirection of stdout and stderr. Conversely, system (and shell on Windows) allows the invocation of arbitrary command lines.


#4

Thanks all. System() and system2 both are working fine.


#5

Hello !

Can you pass your topic as solved ?

Thanks !