[問題類型]:
程式諮詢(我想用R 做某件事情,但是我不知道要怎麼用R 寫出來)
[軟體熟悉度]:
入門(寫過其他程式,只是對語法不熟悉)
[問題敘述]:
嘗試用http://www.r-bloggers.com/integrating-php-and-r/
此網址的範例在本機電腦執行
但無法出現預期效果
[程式範例]:
PHP部分
http://ideone.com/QmHfQT
exec("C:/Program File/R/R-3.2.3/bin/Rscript .\my_rscript.R $N");
R部分
http://ideone.com/vxKQqr
png(filename="C:/test/temp.png", width=500, height=500)
電腦可以執行PHP,但PHP呼叫R之後就沒有下文了
[環境敘述]:
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=Chinese (Traditional)_Taiwan.950
[2] LC_CTYPE=Chinese (Traditional)_Taiwan.950
[3] LC_MONETARY=Chinese (Traditional)_Taiwan.950
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Traditional)_Taiwan.950
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] MASS_7.3-45
loaded via a namespace (and not attached):
[1] tools_3.2.2
[關鍵字]:
R, PHP