Programmer en R/Choisir son environnement de travail

Un livre de Wikilivres.

Terminal[modifier | modifier le wikicode]

On peut lancer R dans un terminal et travailler directement en ligne de commande.

Console interactive de commande en langage R.

Radian[modifier | modifier le wikicode]

Radian permet d'avoir une interface améliorée dans le terminal. Le projet s'inspire de iPython[1].

RStudio[modifier | modifier le wikicode]

Wikipédia propose un article sur : « RStudio ».

RStudio est l'environnement de travail le plus couramment utilisé pour travailler avec R. RStudio peut-être installé sur l'ordinateur local ou sur un serveur.

RStudio sous Ubuntu.

Jupyter Notebook[modifier | modifier le wikicode]

Wikipédia propose un article sur : « Jupyter ».

Jupyter Notebook est une interface utilisateur très couramment employée pour travailler avec Python et Julia. Il est possible d'installer un noyau pour travailler avec R dans Jupyter Notebook.

Un notebook permet de combiner du texte et du code dans un même document.

Comme RStudio, Jupyter Notebook peut être installé localement ou sur un serveur.

Installation[modifier | modifier le wikicode]

Au préalable, il faut avoir installé Jupyter[2]

$ pip3 install jupyter

Après avoir installé Jupyter, il faut installer le noyau R[3] depuis un terminal R ouvert :

install.packages(c('repr', 'IRdisplay', 'crayon', 'pbdZMQ', 'devtools'))
devtools::install_github('IRkernel/IRkernel')
IRkernel::installspec()  # to register the kernel in the current R installation

Notes et références[modifier | modifier le wikicode]

  1. https://github.com/randy3k/radian
  2. http://jupyter.readthedocs.io/en/latest/install.html
  3. https://github.com/IRkernel/IRkernel