Skip main navigation

New offer! Get 30% off your first 2 months of Unlimited Monthly. Start your subscription for just £29.99 £19.99. New subscribers only. T&Cs apply

Find out more

What is RStudio?

screencast on RStudio interface
7.5
At this stage of the course, you should be able now to easily create variables, or read and manipulate data frames, as well as creating simple graphs with ease. This is because all what we covered in basic R will be helpful for this upcoming part of the course where we will be working with RStudio. So for the next two steps, let’s start first seeing together what RStudio is and then how to use RStudio. You should have now properly installed RStudio from the first steps of the course. So open it by simply clicking on it. And let’s have first a general presentation of RStudio. And then we will see together how the RStudio interface works.
49.9
So RStudio is a free and open source integrated development environment, or IDE, for abbrv. RStudio runs on all the major operating systems, such as Windows, Linux, and Mac. What you are seeing now in the screen is the RStudio interface that should contain generally four different areas, or quadrants, each devoted to give you access to a certain type of information. Now, what are all these areas? So let’s start with the bottom left quadrant. So this one is, by default, the console, as you can see it written here. And it is what reproduces the exact same terminal access to R that we used before in R, except of course, that it will open directly in our session.
101.8
You can see here that you have the greater than, or superior sign as a prompt. But this area also allows you to access other resources, such as your main terminal here through the terminal tab. But we will be using the console for now. Now, the bottom right quadrant, which is this one, has many functions. It is what allows you to access your working directory. So if I click here on Files, you will be able to access either your working directory or the directories through that Files tab. You can also create a new folder. You can delete or rename folders. And many more actions you can do here.
145.1
It is also where you will be able to view the plots you generate through the Plots tab. So of course, we don’t have any plots now. But once you generate them, you will be able to see them through this tab. You can also from instal and load packages through the Packages tab. And you can also have access to other information, such as the Help tab here. So for example, it can allow you to interrogate a certain function for its usage. So let’s say that you want to click, for example, on a package. So these are all the packages that you have installed. So some of them are installed by default.
185.5
Some others will be installed because you want them to be there. So we will see examples of that. But here, let’s imagine that we want to see what this base package is. So if you click on it, you will have the help of the documentation and the help for the package that is called a call base. Click and go to the top right quadrant now. It is by default the environment. And it is where you will find information on the objects you’re working with, such as the variable that you are generating while you work. As long as you work here in your console, you will be seeing your variables generated in here. So you can easily remember them.
234
And I loaded for you here as an example the iris dataset. This quadrant should, of course, be empty when you open RStudio by default. But just for the sake of giving you an example, I just loaded the iris dataset before. So from this quadrant, you will also be able to access the history of all your commands from this area when clicking on this tab. The final quadrant, which is the top left quadrant, is what we call the source area. And it is where you will generally view the source content of a script, for example. It could be an existing file that you directly open from files existing here.
277.3
Or it could also be a new one that you are creating, and where you can add comments that are successful as long as you are generating commands, or typing commands in the console. The fact that commands are placed into files would allow you, of course, to manipulate them very easily later on, and to retrieve them very easily. So you can access all these areas of quadrants at the same time, as you can see it here. Or you can simply click to reduce or expand some of them to reorganise your interface according to your preferences, of course. So let’s say for example, that I want to view mainly the console and not necessarily the script.
324.7
So I just click on the small icon, and I will have the console taking this area. I can also reduce it completely, or I can restore the first version of it. I can also click on any of these quadrants to do exactly the same. I am not going into the details of modifying other basic settings, such as the background colour or the default working directory. But there are many other settings you can adjust. So know that it is feasible from the Preferences of RStudio. So if you open your Preferences, you will be able to access a lot of different settings, such as the Default Working Directory, for example, or the appearance of your screen.
370.7
In short, if we can summarise what we saw in this first video, the RStudio interface is very intuitive. It is organised in a way that allows you, as a user, to clearly view in one single interface many information, such as the code you are using here, the commands you’re writing or executing here, the variables you are creating, or the graphics you’re generating. So it basically offers the possibility to interact with an R based environment through a user interface solution such as simply clicking on File, for example, to open it, without having to write or code in R to do so. In the next video, or step, we will start learning together how to use RStudio.

In this screencast, Fatma is explaining the RStudio interface

Please watch this video and follow along! It will be important for your learning in the following steps of this week.

Do leave your comments in the comments section below.

This article is from the free online

Bioinformatics for Biologists: An Introduction to Linux, Bash Scripting, and R

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now