B.2 Introduction to RStudio
RStudio is the most employed Integrated Development Environment (IDE) for R nowadays. When you start RStudio you will see a window similar to Figure B.1. There are a lot of items in the GUI, most of them described in the RStudio IDE Cheat Sheet. The most important things to keep in mind are:
- The code is written in scripts in the source panel (upper-left panel in Figure B.1).
- For running a line or code selection from the script in the console (first tab in the lower-left panel in Figure B.1), you do it with the keyboard shortcut
'Ctrl+Enter'
(Windows and Linux) or'Cmd+Enter'
(Mac OS X).

Figure B.1: Main window of RStudio. Extracted from here.