Jupyter notebookでRを使うための環境構築2018年1月
最近専らPythonを使う時はJupyter notebookを使っています。 コードと結果が両方残って、かつgithubに上げたときもそのセットが共有できる、ということが魅力と感じています。 RだとRstudioという素晴らしいIDEがあるわけで、あとはRmarkdownとかもあるわけで…けど、Jupyter notebookでRを使えたら、きっと便利だろうと思ったので、話には聞いたことはあったけどやったことがなかった環境構築をやってみました。
参考文献
環境
$python --version Python 3.5.1 :: Anaconda custom (x86_64) $jupyter --version 4.1.0 $R --version R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin13.4.0 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under the terms of the GNU General Public License versions 2 or 3. For more information about these matters see http://www.gnu.org/licenses/.
やってみる
結論から言うと、公式の通りにやって、一瞬で終わります。
install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest')) devtools::install_github('IRkernel/IRkernel') IRkernel::installspec()
テンションが上がった。
ふおおお!テンション上がる!!
— kyyonko (@kyyonko) 2018年1月28日
JupyterでのRの環境構築、一瞬だった… #jupyterbook pic.twitter.com/W2BhzciZuH
これからはJupyterでもRを楽しめそうです!