In this article, we take a look at RStudio IDE. We take a look at some of the simple features of IDE that allows us to write and execute the R code. As we progress further, we will see more advanced features of IDE in upcoming articles in this series.
Installation
You can download and install the IDE from official RStudio page. Depending on the operating system, the download instructions will vary. However the installer is self explanatory and doesn’t require much configuration or settings on your part. Just download and run the installer with default settings.
Workspace
When you open RStudio for the first time, you’d find workspace divided into multiple groups. You have four different groups in workspace. You can write the code in one of the workspace. You can see the R Console in another workspace group. You can modify how each group works and looks. You have to see which view makes you comfortable. If you want to reset the workspace view then you can do that too.
In order to compile your sourcecode into R, you need to use console. If you are creating Rscript then you can make use of respective workspace. From there you can create script which can be executed in console. In order to use console, you type your code directly into the prompt.
Try typing 1+1 into the console. And after that hit enter. This should put the prompt into the next line. This is using directly the RConsole prompt.
If you want to use RScript then you can use the File > New > RScript option.
On RStudio you can use the Icon that allows you to create Rscript, Rnotebook etc.
If you want you can watch this video to get the brief idea of how to use RStudio and some of the controls inside the program.
Each version brings something new in terms of features. So with every update, you may find some changes within the program.
In next tutorial, we take a look at how to create vectors and store the content into it. Feel free to ask your questions into the comments.