差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
memo:r [2013/07/28 13:09]
hasegawa
memo:r [2016/07/17 04:22] (現在)
ライン 1: ライン 1:
 {{tag>R tips windows osx}} {{tag>R tips windows osx}}
 ====== Rに関するあれこれ ====== ====== Rに関するあれこれ ======
 +
 +===== VimでR =====
 +
 +http://​qiita.com/​kirishima274/​items/​56233d5cd830d099b28f
 +
 +
 +Vim-R-pluginを使う.
 +
 +  NeoBundle '​vim-scripts/​Vim-R-plugin'​
 +
 +以下は,
 +http://​www.lepem.ufc.br/​jaa/​r-plugin.html#​r-plugin-installation
 +を参考.
 +
 +==== vimcomを入れる ====
 +
 +ダウンロード
 +
 +  download.file("​http://​www.lepem.ufc.br/​jaa/​vimr/​vimcom_1.2-6.tar.gz",​
 +                destfile = "​vimcom_1.2-6.tar.gz"​)
 +
 +=== MacVimを使わない ===
 +
 +vimcomインストール
 +
 +  install.packages("​vimcom_1.2-6.tar.gz",​ type = "​source",​
 +                   ​configure.args="​--enable-clientserver",​
 +                   repos = NULL)
 +
 +失敗したら,XQuartzを一旦アンインストールして,Homebrew caskから入れ直す.
 +
 +  brew cask install xquartz
 +
 +VimもHomebrewから入れる
 +
 +  brew install vim --with-client-server --with-lua
 +
 +
 +=== MacVimを使う ===
 +  brew install macvim --with-cscope --with-client-server --with-lua --HEAD
 +
 +
 +=== MacVim-Kaoriyaを使う ===  ​
 +  install.packages("​vimcom_1.2-6.tar.gz",​ type = "​source",​
 +                   repos = NULL)
 +
 +==== その他のRパッケージをインストール ====
 +
 +
 +Rのコンソールの出力を色付けて表示
 +
 +  download.file("​http://​cran.r-project.org/​src/​contrib/​Archive/​colorout/​colorout_0.9-9.tar.gz",​ destfile = "​colorout_0.9-9.tar.gz"​)
 +
 +  install.packages("​colorout_0.9-9.tar.gz",​ type = "​source",​
 +                 repos = NULL)
 +
 +  install.packages("​setwidth"​)
 +
 +
 +==== .Rprofileに追記 ====
 +
 +   ​if(interactive()){
 +       ​library(colorout)
 +       ​library(setwidth)
 +       ​options(vimcom.verbose = 1) # optional
 +       ​library(vimcom)
 +   }
 +
 +==== エイリアスを設定 ====
 +.zshrcに追記
 +
 +  # vim-rでHomebrewで入れたVimをVim-R-pluginのオプション付きで使う
 +  alias vim-r='​reattach-to-user-namespace /​usr/​local/​bin/​vim --servername VIM'
 +
 +==== tmuxを入れる ====
 +
 +  brew install tmux
 +  brew install reattach-to-user-namespace
 +
 +なお、reattach-to-user-namespaceはtmuxのコピーコマンドでのクリップボード共有に使う。
 +
 +設定は,https://​github.com/​b4b4r07/​dotfiles/​blob/​master/​.tmux.conf を流用させてもらう.この設定の解説は http://​qiita.com/​b4b4r07/​items/​01359e8a3066d1c37edc にある.
 ===== Proxyの設定 ===== ===== Proxyの設定 =====
-プロクシ,プロクシー+プロクシ,プロクシー,プロキシ
  
 Windowsではシステム設定を利用するために,Rの起動オプションに Windowsではシステム設定を利用するために,Rの起動オプションに
ライン 177: ライン 259:
              , x = 141.350, y = 43.042, base_size = 0.8              , x = 141.350, y = 43.042, base_size = 0.8
   )   )
 +
 +因子水準で色を変えた折れ線グラフ(グラフとして適当ではないが)
 +  print(
 +  ggplot(data.frame(iris,​ id = 1:​nrow(iris)),​ aes(x = id, y = Petal.Length,​ colour = Species))
 +    + geom_point()
 +    + geom_line(aes(group = interaction(Species)))
  
  
-参考になりそう ​http://​d.hatena.ne.jp/​triadsou/​20100528/​1275042816+とても参考になる http://​d.hatena.ne.jp/​triadsou/​20100528/​1275042816
  
 ==== ループの途中で画像等を出力 ==== ==== ループの途中で画像等を出力 ====
memo/r.1375016976.txt.gz · 最終更新: 2016/07/17 04:20 (外部編集)
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0

- Rental Orbit Space -