开发者

Run an executable in R script

Is there a way to开发者_JAVA技巧 run an executable from R and capture its output?

As an example:

output <- run_exe("my.exe")


Yes, look at system() and its options. Hence

R> res <- system("echo 4/3 | bc -l", intern=TRUE)
R> res
[1] "1.33333333333333333333"
R> 

would be one way to divide four by three in case you mistrust the R engine itself.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜