When I first started to learn to use R, I was bound and determined to use the basic R GUI.
As someone who was already used to programming in SAS, I wasn’t looking for a point-and-click interface like R Commander. These kinds of interfaces are notoriously limiting when it comes to advanced analyses and software capabilities. (Though if I’m being honest, probably 95% or more of my daily tasks could be handled using R Commander.)
Without knowing much about it, I also didn’t want to use RStudio. It seemed overly complicated to download an additional software package for something that already functioned on its own.
One day though, when working with someone who wanted to use RStudio, I decided to download it and give it a chance.
I never went back to using the basic R GUI, primarily for the following reasons:
1) RStudio is designed to make it easy to write scripts.
As soon as you create a new script, the windows within your RStudio session adjust automatically so you can see both your script and the results in your console when you run your syntax.
Even better is the ability to call up potential syntax options while you are writing just by using the tab key.
For example, suppose I am trying to access a variable in a data set called “teachers”, but I haven’t memorized the variable names:
2) RStudio makes it convenient to view and interact with the objects stored in your environment.
In the basic R GUI, you can always list the objects you have stored in your environment. But RStudio has a very useful “Environment” window available.
This shows all of the objects that you have stored, including data; scalars, vectors, and matrices; model outputs; etc., along with a summary of the information that is stored in those objects.
You can even click on your data sets directly to open them and view them as spreadsheets.
3) RStudio makes it easy to set your working directory and access files on your computer.
Especially if you are working in Windows, one of the most tedious parts of programming in R is setting your working directory to access your files.
With RStudio, you can navigate to folders on your computer in the “Files” window, view any files you have in that folder, and set that folder as the working directory.
4) RStudio makes graphics much more accessible for a casual user.
The basic R GUI requires you to go to some lengths to save graphics as you go. But RStudio has a window that does exactly that.
You can easily click back and forth between plots, change the sizes of your plot without rerunning the code, and export or copy plots to include in other documents.
While it doesn’t have quite the flexibility of R’s graphical devices, it provides everything that many users would need.
Additionally, RStudio allows you to use R’s graphical devices in any way that you can use them in the basic R GUI, if you feel the need (i.e., you are not limited to using the plots window).
Best of all, like R, RStudio is free and open-source.
If you are new to R and would like to learn to code, have been struggling to learn R with the basic GUI, or have been using it for a while but would like a more efficient environment, RStudio is an option that may be worth exploring.