How to Navigate RGui - dummies

How to Navigate RGui

By Andrie de Vries, Joris Meys

As part of the process of downloading and installing R, you get the standard graphical user interface (GUI), called RGui. RGui gives you some tools to manage your R environment — most important, a console window. The console is where you type instructions, or scripts, and generally get R to do useful things for you.

Explore the R console

The standard installation process creates useful menu shortcuts (although this may not be true if you use Linux, because there is no standard RGui editor for Linux). In the menu system, look for a folder called R, and then find an icon called R followed by a version number.


When you open RGui for the first time, you see the R Console screen, which lists some basic information such as your version of R and the licensing conditions.


Below all this information is the R prompt, denoted by a > symbol. The prompt indicates where you type your commands to R; you see a blinking cursor to the right of the prompt.

Issue a simple command in the R console

Use the console to issue a very simple command to R. Type the following to calculate the sum of some numbers:

> 24+7+11

R responds immediately to your command, calculates the total, and displays it in the console:

> 24+7+11
[1] 42

The answer is 42. R gives you one other piece of information: The [1] preceding 42 indicates that the value 42 is the first element in your answer. It is, in fact, the only element in your answer!

One of the clever things about R is that it can deal with calculating many values at the same time, which is called vector operations. You need to know is that R can handle more than one value at a time.

Close the R console

To quit your R session, type the following code in the console, after the command prompt (>):

> q()

R asks you a question to make sure that you meant to quit,. Click No, because you have nothing to save. This action closes your R session (as well as RGui, if you’ve been using RGui as your code editor).