目前執行R軟體專案, 大部份會在個人電腦上執行, 如果希望將結果分享給其他人員, 一般會直接將R程式檔複製給他人. 相反地, 如果可以在WEB上直接應用(例如: 連結至某個網頁, 該網頁提供資料上傳與線上整合服務), 則 R的應用相信更可向上提昇. 目前已有部份套件已達到上述相似功能, 參考 R FAQ - 4. R Web Interfaces, 近期有個 shiny package 提供更方便, 互動式網路應用, 當使用者在網頁上更新資料時, 其結果"立刻"在WEB上呈現出來. shiny 其英文簡介如下:
Easy web applications in R
Shiny makes it super simple for R users like you to turn analyses into interactive web applications that anyone can use. Let your users choose input parameters using friendly controls like sliders, drop-downs, and text fields. Easily incorporate any number of outputs like plots, tables, and summaries.
No HTML or JavaScript knowledge is necessary. If you have some experience with R, you're just minutes away from combining the statistical power of R with the simplicity of a web page.
結果 http://localhost:8100/ , IE瀏覽器執行有問題, 直接將網址複製到 Google Chrome, 結果如下圖所示:
執行 shiny "01_hello" 範例R程式碼:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[步驟4] 選取上方 Download and Install R 項目中的作業系統, 例如:Download R for Windows [步驟5] 選取 Subdirectories 項目中的 base [步驟6] 點選 Download R x.xx.x for Windows [步驟7] 儲存並安裝檔案