2011-03-23 63 views

回答

7

是的,看着system()及其选项。因此,

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

将是一种方法除以四,如果你不信任R引擎本身。

+0

太棒了!谢谢! – 2011-03-23 20:10:34

+2

哈哈,让我想起了这个https://stat.ethz.ch/pipermail/r-help/2011-March/272562.html – mdsumner 2011-03-23 20:22:42