在php中運行
exec("Rscript runGO.R --args ".$_POST['enrich'],$stdout,$status),status報告未執行完畢
在php中運行下面兩句:
system("cat runGO.R|R --vanilla --args ".$_POST['enrich'],$stdout);
foreach($stdout as $line){echo $line;echo "\n";}
網頁中顯示
filerefread and white get_contents: R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > > library(GO.db)
載入一些library時php會停止R的運行,然後報錯。但不調用GO.db和geneLenDataBase這些載入時間比較長得庫就不會卡住。
請問各位有什麼好得方法讓php能完整調用R的腳本?