從哪裏可以安裝Rscript?我需要使用exec從php文件運行R腳本。不過,我需要先安裝Rscript。Ubuntu上的Rscript
回答
搜索Ubuntu的repositories。你檢查了littler
包嗎?
到目前爲止發佈的答案通常很有用,但它們並不直接回答問題。我最近有同樣的問題,發現Ubuntu沒有rscript二進制文件。 r二進制本身用於在批處理模式下執行腳本,與我在OS X中使用的單獨rscript二進制文件相反。
看起來,您可能能夠從其他來源獲取rscript二進制文件(請參閱http://craig-russell.co.uk/2012/05/08/install-r-on-ubuntu.html#.UwKWzkJdW2Q例如),但我不知道爲什麼當你從命令行簡單地運行「r script.r」時,你會需要這樣做。
我想在一個新鮮的Ubuntu安裝(16.04.2 LTS)運行Rscript
並獲得:
The program 'Rscript' is currently not installed. You can install it by typing: sudo apt install r-base-core
因此,很自然,我跑sudo apt install r-base-core
。
安裝花了幾分鐘。
後來,我需要安裝一個R軟件包,並且意識到我需要一個R shell。運行r
返回:
The program 'r' is currently not installed. You can install it by typing: sudo apt install r-cran-littler
同樣,我也跟着,這一次是相當快。
我不知道這些是否是正確的步驟(或爲什麼他們會錯),但這是系統讓我做的。
這是一個遲到的評論,但運行R shell的正確方法是使用大寫「R」,它應該使用「r-base」進行安裝。 – arredond
- 1. 在Mac OS上運行的RSCRIPT X
- 2. Rscript and Incredibuild
- 3. 從Java調用rscript
- 4. 從Java執行Rscript
- 5. OpenCV的ubuntu上
- 6. ubuntu上的ARToolKit
- 7. Ubuntu上的Opennebula
- 8. Ubuntu上的wxMkdir
- 9. Ubuntu上的OpenCV
- 10. ubuntu上的Monodevelop
- 11. ImageMagick的Ubuntu上
- 12. Rscript不支持換行符?
- 13. Rscript和用戶提示
- 14. Rscript是否有Emacs模式?
- 15. R taskscheduleR無法識別rscript
- 16. 如何調試Rscript調用
- 17. 啓動沒有DOS的RScript框(在Windows上)?
- 18. Ubuntu上的Grails 12.10
- 19. Ubuntu上的argstream.h庫
- 20. Ubuntu 64bit上的Rails?
- 21. U盤上的Ubuntu
- 22. Ubuntu上的System.Security.Cryptography.Csp 16.04
- 23. ubuntu上的turbo prolog
- 24. Ubuntu 11.04上的wx.TaskBarIcon
- 25. ubuntu上的kubernetes 16.04
- 26. Ubuntu上的Installig Vertica
- 27. Ubuntu上的Apache2 PassEnv
- 28. Ubuntu上的VirtualBox VERR_VM_DRIVER_VERSION_MISMATCH
- 29. Rscript和R CMD BATCH的不同結果
- 30. Rscript + PHP的exec()命令vs rapache
您是否知道StackExchange有專門針對Ubuntu的自己的論壇?這是真的,我發現他們真的很有用:askubuntu.com – theJollySin