#contents *概要 [#description] ''[[Shiny:http://www.rstudio.com/shiny/index.html]]''は、''[[R:http://www.r-project.org/index.html]]''のパッケージの一つで、''[[Rook:https://github.com/jeffreyhorner/Rook]]''と同様に、バックエンドに''[[R:http://www.r-project.org/index.html]]''を用いて''[[R:http://www.r-project.org/index.html]]''に内蔵されているWebサーバー上で統計解析を可能にする対話式のWebアプリケーションを簡単に作成できるようにするものです。 なお、両者共に[[Apache:http://httpd.apache.org/index.html]]上で''[[R:http://www.r-project.org/index.html]]''を動作させる''[[rApache:http://rapache.net/index.html]]''でデプロイすることもできます。 ''[[Shiny:http://www.rstudio.com/shiny/index.html]]''は''[[RStudio:http://www.rstudio.com/index.html]]''プロジェクトの一環として開発されていますが、''[[RStudio:http://www.rstudio.com/index.html]]''とは独立して動作します。 (''[[RStudio:http://www.rstudio.com/index.html]]''については、「[[RStudio>RStudio]]」を参照してください。) Web上のユーザーインタフェースを司る''ui.R''と内部動作を司る''server.R''の二つの''R言語''スクリプトだけでサーバーサイドのコンテンツ作成ができるのが大きな特徴です。(([[shinyでシャイニイイイイイイイイイイイイイイイイイイイイイイイイイ:http://d.hatena.ne.jp/dichika/20121109/1352430717]])) >[[Shiny:http://www.rstudio.com/shiny/index.html]] 公式サイト >>[[Tutorial: Building 'Shiny' Applications with R:http://rstudio.github.io/shiny/tutorial/index.html]] チュートリアル >>>日本語訳については「[[チュートリアル: RによるShinyアプリケーションの構築>チュートリアル RによるShinyアプリケーションの構築]]」を参照のこと >[[shiny:https://github.com/rstudio/shiny]] 開発レポジトリ 各''[[R:http://www.r-project.org/index.html]]''ユーザーによる''[[Shiny:http://www.rstudio.com/shiny/index.html]]''の使用例は[[glimmer:http://glimmer.rstudio.com/]]サーバーにて公開されています。([[一覧:http://www.google.co.jp/search?num=100&newwindow=1&safe=off&q=site%3Ahttp%3A%2F%2Fglimmer.rstudio.com%2F&oq=site%3Ahttp%3A%2F%2Fglimmer.rstudio.com%2F&gs_l=serp.3...0.0.0.12588.0.0.0.0.0.0.0.0..0.0....0...1c..25.serp..0.0.0.PtXUR8rq3w4]]) 自分も試してみたい、という方は、登録したうえで指示に従って''R言語''スクリプトをアップロードするだけでできます。(([[みんなでシャイニイイイイイイイイイイイイイイイイイイイイイ:http://d.hatena.ne.jp/dichika/20130118/1358470135]])) >[[Shiny Server beta program:https://rstudio.wufoo.com/forms/shiny-server-beta-program/index.php]] ''[[Shiny:http://www.rstudio.com/shiny/index.html]]''用サーバー(公開用)利用登録 他のインターネット上のサーバーならば、例えば、[[Gists:https://gist.github.com/]]に''R言語''スクリプトをアップロードして、利用者にURLを通知するのが簡単です。(([[はじめてのShiny:http://www.slideshare.net/wdkz/shiny-16178934]])) URLが >[[https://gist.github.com/ユーザー/ディレクトリ:https://gist.github.com/ユーザー/ディレクトリ]] //https://gist.github.com/ユーザー/ディレクトリ //文字参照 //https://gist.github.com/ユーザー/ディレクトリ ならば、 利用者は''[[R:http://www.r-project.org/index.html]]''コンソール上で shiny::runGist ( "ディレクトリ" ) と入力するだけで使えます。 *使用方法 [#use] ''[[R:http://www.r-project.org/index.html]]''コンソール上で if ( length ( grep ( paste ( "^" , "shiny" , "$" , sep="" ) , installed.packages ( ) [ , "Package" ] ) ) < 1 ) { install.packages ( shiny ) # 未インストールの場合にのみ"shiny"をインストールする } library ( shiny ) # パッケージをロードする runApp ( "ui.Rとserver.Rの二つがあるディレクトリのpath" ) # Shiny Web App. 実行 とする。 ウェブサーバーが立ち上がりますが、セキュリティ周りが弱いので注意して運用する必要が有ります。 ローカルにサーバーを立てる場合は''OpenShiny''という補助アプリケーションが存在します。(Windows 限定) >[[Shiny アプリをワンクリックで起動するやつ作った:http://d.hatena.ne.jp/hoxo_m/20121122/p1]] *参考文献 [#w9ac2055] -[[Web Application Development with R Using Shiny:http://www.packtpub.com/web-application-development-with-r-using-shiny/book]], Beeley, C., Packt, 2013. *参考記事 [#article] -[[統計データを誰でも使いやすくするR製Webアプリケーションフレームワーク「Shiny」:http://www.moongift.jp/2013/07/20130718-2/]] -[[Shinyを使って、RだけでWebアプリケーション:http://ixixi.hateblo.jp/entry/2012/11/10/150759]] -[[RStudio Shiny TIPS:http://d.hatena.ne.jp/hoxo_m/20121228/p1]] -[[メモ: RStudio Shiny でファイルごとにタブを作る:http://qiita.com/hoxo_m/items/69e825e8f2b59a9496d6]] -[[Tab by File Test:http://glimmer.rstudio.com/hoxom/TabByFileTest/]] -[[Twitter関連タグ検索:https://gist.github.com/nezuQ/4702281]] -[[Webアプリ開発なら、Shiny?:http://jn1inl.blog77.fc2.com/blog-entry-1796.html]] -[[RStudio ShinyでTwitterアプリを作ってみる:http://nezuq.blogspot.jp/2013/01/rstudio-shinytwitter.html]] --[[Readme.R:https://gist.github.com/nezuQ/4702281]] -[[Shiny allows web applications with R:http://flowingdata.com/2012/11/13/shiny-allows-web-applications-with-r/]] -[[A Shiny web app to find out how much medical procedures cost in your state.:http://www.r-bloggers.com/a-shiny-web-app-to-find-out-how-much-medical-procedures-cost-in-your-state/]] -[[More explorations of Shiny:http://www.econometricsbysimulation.com/2013/06/more-explorations-of-shiny.html]] -[[Principal Components Analysis Shiny App:http://imdevsoftware.wordpress.com/2013/06/23/principal-components-analysis-shiny-app/]] -[[Interactive Heatmaps (and Dendrograms) – A Shiny App:http://imdevsoftware.wordpress.com/2013/07/07/interactive-heatmaps-and-dendrograms-a-shiny-app/]] -[[Dashboards in R with Shiny and GoogleVis:http://hernanresnizky.wordpress.com/2013/08/02/dashboards-in-r-with-shiny-and-googlevis/]] -[[Crime Against Women in India – Addressing 8 Questions Using rCharts, googleVis, and shiny:http://analyticsandvisualization.blogspot.jp/2013/10/crime-against-women-in-india-addressing.html]] -[[Interactive 3D in Shiny (shinyRGL):http://trestletechnology.net/2013/10/interactive-3d-in-shiny-shinyrgl/]]