Skip to main content
It looks like you're using Internet Explorer 11 or older. This website works best with modern browsers such as the latest versions of Chrome, Firefox, Safari, and Edge. If you continue with this browser, you may see unexpected results.

R Software for Business Guide: Navigate

R and RStudio

R users typically work in RStudio. This IDE (Integrated Developer Environment) integrates with the basic R software to offer a more-accessible interface for everything from writing code to installing packages. If someone says they use R, they probably run RStudio as they program in the R language.

Console

With the default RStudio layout, coding happens in the pane along the left.

The Console lets you type code and run it line-by-line. Code runs when you press the Enter key. Code you've run appears here as a continuous log with any printed output.

RStudio window running ?c in the Console

The Console gets cleared when R closes and starts fresh with the next session. This is great if you just need to run a line of code once, in the moment--like opening Help (?) to see how a function works. Store content you want to save outside of the Console.

Code File

Code you want to develop or save goes in the code file (above the Console).

Run the current line or a selected chunk of code by pressing Ctrl+Enter, or Click the relevant run button (green arrow icons).

RStudio, using the code file to save a vector to the Environment

Running code from the code file automatically enters it in the Console without affecting the code file. Save your code for later by using the file menu or disk icons.

Other Output

RStudio, right panesDepending on its design, an R function may print a result in the Console, change an aspect of your system, or generate output that doesn't appear in the Console.

If you create an object by assigning data to a name (e.g.: name <- 1; dat <- c(1:5)), the object appears in the Environment in the upper right pane. Use any object stored in the Environment by typing its name in your code.

If you open Help or visualize your data, the result appears in the lower right pane.