[R] Run an external software in R
wdunlap at tibco.com
Wed Sep 7 06:25:51 CEST 2016
You can use system() or shell(), which adds "cmd.exe /c " to the front of
so you can use DOS syntax. Remember to add double quotes when file names
spaces in them. E.g., I can call an old version of R with the following
and later read its
text output into my current session.
> infile <- tempfile()
> cat("getRversion()\n", file=infile)
> outfile <- tempfile()
> shell(paste("\"C:\\Program Files\\R\\R-2.15.1\\bin\\R\" --quiet --vanilla
<", infile, ">", outfile))
 "> getRversion()" " '2.15.1'" "> "
On Tue, Sep 6, 2016 at 6:13 PM, Marino David <davidmarino838 at gmail.com>
> Hi all R users:
> Does anybody have the experience of running an external software in R? I
> try to use R to run ANSYS software, which is a engineering simulation
> package. I ever have done this task in Matlab platform by executing
> the following code line:
> system('"C:\Program Files\Ansys Inc\v100\ANSYS\bin\intel\ansys100" -b -p
> ane3fl -i D:\Ansys\MyAnsysCode.txt -o D:\Ansys\vm5.out');
> Any idea regarding implementing this work is very welcome.
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help