統計軟體 R簡介安裝操作方式變數與運算有序數列向量矩陣多維陣列複數因子串列資料框時間數列流程控制輸出入呼叫函數2D 繪圖3D 繪圖互動介面套件列表其他語言呼叫R 的應用集合邏輯推論模糊邏輯機率邏輯檢定搜尋優化算法線性代數決策樹人工智慧分群分類SVM 向量機神經網路遺傳演算法資料採礦訊號處理影像處理語音處理自然語言機器學習機器人生物統計數位訊號處理方程式求解數值分析微積分微分方程線性規劃圖形理論統計推論字串處理正規表示式視窗程式網頁程式文件格式貝氏網路訊息機率統計書相關網站參考文獻最新修改簡體版English |
從命令列呼叫 R 程式。
如果要從命令列執行 R 程式,可以用下列方法。 檔案:d:\code\R\test.R
執行命令:
結果可以在 D:\code\R 資料夾下看到一個 test.Rout 的檔案,內容如下:
如果要用程式以命令列呼叫 R 程式,可以參考下列文章
I’m writing this post because I just spent a couple of hours banging my head against the wall, trying to figure out how to run an R script from the command line. It was working if I simply ran it at the command line. But when I try to run the same command from Java (I know, this sounds convoluted) using the following code, it was behaving strangely and wasn’t executing. (錯誤方法)
So I finally found out that there is a utility in R that is designed to help you execute scripts at the command line more easily. It’s called RScript. Now I’m doing it the following way, and it’s working beautifully. (正確方法)
Seems obvious, but it wasn’t to me, and it took awhile to find an answer. 呼叫系統函數 (R 與外部程式)相反的,如果要從 R 呼叫系統程式,可以參考下列文章:
與 Python 連結
與 Perl 連結與 PHP 連結與 C 連結 |
R 與其他語言的連結
page revision: 8, last edited: 05 Sep 2011 07:19
Post preview:
Close preview