When learning a new language (programming or other), it’s not always easy to get started.  10 years ago, I learned R using only the R console.  Today, RStudio is here to make our life easier.  I use this IDE everyday to write and execute R code!

 This development environment built for R allows me to see at the same time my script, my console, graphs or help (the different panels can be customized).  The window where I write my script sends directly the code to the console. No more copy-paste! The integrated help and the auto completion flatten the learning curve and helps a lot in case your memory lets you down. A number of libraries have been integrated to add functionalities.   For example, the package manipulate adds interactivity to plots (can change variable value without rewriting a command).  As for the  package knitr, it allows the creation of html notebook to easily document and share your analysis.  A single click on the Notebook icon upright of the script panel and you’re good to go.

The new version (0.98) even allows the creation of html presentation, again removing the need of copy paste operations (copy of the command line results in the presentation).  Here is one presentation I made for an “Introduction to R” workshop. Feel free to go through it!


The presentation can be displayed in a web browser such as google-chrome or firefox but it can also be displayed inside RStudio.  This is cool if you want to see the presentation at the same time as the console.  Similarly, a new feature allows the display of local html file in the Viewer panel.  Useful when you’re working with packages such as googleVis or rCharts.

On the coding side, classic debugging tools in the form of code break and inspection have been added and the Rcpp package now provides a way to work at  the C++ level.



Purists might say that real programmers write code in the console.  I think that when good tools are available, it’s a shame not to use them!

Edited : Talking about the Viewer panel, check the package ggvis to add interactivity to your plots. This package (from the author of ggplot2, Hadley Wickham) can be easily used in RStudio or in shiny web applications.