Back to bricks list
Introduction Version

R environment

The Codelab also support an R environment. You can write and test R script. You can also use R script inside a jupyter notebook code for quick test.



Install R environment


The R environment is not included in Codelab by default, but don't worry it is quite simple to install it. Simply run the following command :


. /init-lab/r_config/install_r.sh


This will take a few minutes but this will install the R environment completely. Once its done, just install the VsCode R extensions ("REditorSupport.r"). And you are ready to go.



With this environment installed, you can create and run R script directly with VsCode. Here is the documentation about R in VsCode, please not that you don't need to following the installation process : https://code.visualstudio.com/docs/languages/r



Using R in Jupyter notebook


With the R environment installed you can write R code directly in a Jupyter notebook file and test it ! Verifiy that you have the Jupyter extension from ms-toolsai. ("ms-toolsai.jupyter").




Open a Jupyter notebook file and click on the Python 3 button on top right :



Select the R kernel. Click on Select Another Kernel > Jupyter Kernel > and you should see R kernel. to go !