LoginSignup
13
13

More than 5 years have passed since last update.

Jupyter Notebook上でRを使えるようにする

Posted at

Jupyter Notebook上でRを使う環境設定の参考になればと思い書きました!!

環境

macOS High Sierra (10.13.2)

Rのインストール

Rがmacに入っていなかったので、このR for mac OSからパッケージをインストールします。

そしてターミナル上で

$ r

と入力してRのインタプリタを起動します。

RとJupyter Notebookをつなぐ

以下のコマンドでバイナリーパッケージをインストールします。

> install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))
> devtools::install_github('IRkernel/IRkernel')

そしてRとJupyter Notebookをつなぐために次の2つのコマンドを実行します。

> IRkernel::installspec()
> IRkernel::installspec(user = FALSE)

これでブラウザ上で開いてるJupyter Notebookのhome画面でnewタブを押してRが選択肢に入って入れば完了です。

13
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
13