Console

The Console is your direct line to R. You type a command, tap the play button, and the result appears immediately. It is the fastest way to try out ideas, inspect variables, and explore data without writing a full script.

Overview

The Console screen has three main areas:

  1. Title bar at the top, showing “Console” with a trash icon to clear the output
  2. Output area in the middle, a scrollable view of everything you and R have exchanged
  3. Input field at the bottom, a rounded text field with an “Enter R code…” placeholder, a blue play button on the right, and history navigation arrows on the left

Empty console ready for input

Empty console ready for input

Running Code

To execute R code:

  1. Tap the input field at the bottom of the screen. The software keyboard appears along with the R keyboard toolbar.
  2. Type your R expression (for example, mean(1:10)).
  3. Tap the blue play button to execute.

The command you typed appears in the output area in blue, prefixed with >. The result appears directly below it. You can keep entering commands one after another. The output scrolls to show the latest result.

Console with commands and colored output

Console with commands and colored output

While code is running, an “Executing… 0s” indicator appears at the top of the output area with an animated dot. The timer counts up so you know how long your code has been running.

Console showing the executing indicator

Console showing the executing indicator

If you have an external keyboard connected, press Return to execute instead of tapping the play button.

Output Colors

The console uses color to help you scan results at a glance. Each color represents a different type of output:

Color Meaning Example
Blue Your input commands, prefixed with > > mean(1:10)
Black (light mode) / White (dark mode) Normal R output printed to standard output [1] 1 2 3 4 5
Green Values returned by expressions [1] 5.5
Orange Warnings: R completed the operation but something may be off Warning: NAs introduced by coercion
Red Errors: R could not complete the operation Error in eval(expr): object 'y' not found
Gray Informational messages from R or packages Loading required package: stats

Try running these commands one at a time to see each color in action:

x <- 42
x
print("hello")
message("this is a message")
warning("something looks off")
stop("this is an error")
y

Console output showing color-coded results for input, normal output, return values, messages, warnings, and errors

Console output showing color-coded results for input, normal output, return values, messages, warnings, and errors

Read error messages carefully. R usually tells you exactly what went wrong. For example, Error in eval(expr): object 'y' not found means you used a variable named y that has not been assigned a value.

Copying output

Long-press any output line to copy its text to the clipboard. You will feel a brief haptic vibration and see a “Copied to clipboard” confirmation.

History Navigation

You do not have to retype commands you have already run. The console keeps a persistent history of everything you have entered, and it carries over between sessions.

Arrow buttons. Use the up and down chevron buttons on the left side of the input field to step backward and forward through your command history. Tap the up arrow to load the previous command; tap down to move forward again.

Swipe gestures. You can also swipe up on the input field to load the previous command, or swipe down to go forward.

Search History. For longer sessions, tap the overflow menu () and choose Search History. A search sheet opens where you can type a keyword to filter past commands. Tap any result to load it back into the input field.

Command history is saved to persistent storage and survives across sessions. For a full history view with search, filtering by source (Console vs Editor), and execution statistics, navigate to More > History.

R Keyboard Toolbar

When the software keyboard is open, a scrollable toolbar appears directly above it with buttons for common R symbols and operators. This saves you from hunting through the Android symbol keyboard for characters you use constantly in R.

The toolbar includes:

Button Purpose
<- Assignment operator
\|> Native pipe operator
() Matched parentheses (inserts both)
[] Matched square brackets
{} Matched curly braces
"" Matched double quotes
~ Formula operator
c() Quick vector wrapper
:: Namespace access (e.g., dplyr::filter)
$ List/data frame column access
@ S4 slot access
%in% Value matching operator
! Logical NOT
& Logical AND
\| Logical OR
# Comment prefix
Tab Inserts indentation

R keyboard toolbar visible above the software keyboard

R keyboard toolbar visible above the software keyboard

This is the same toolbar you will see in the Editor. The paired characters ((), [], {}, "") insert both the opening and closing character at once, placing your cursor between them.

The toolbar buttons can be customized. See Customizing the R Toolbar in the Settings guide.

Code Completion

As you type in the input field, a popup of suggestions appears above it. These include function names, variable names, package members, and argument names. Tap a suggestion to insert it, saving you from typing out long names like as.data.frame() or your own custom variable names.

Completions update as you type, narrowing down to the best matches. They work for:

  • Base R functions and constants
  • Functions from loaded packages
  • Variables you have created in the current session
  • Column names when typing after $

Code completion popup showing function suggestions

Code completion popup showing function suggestions

Console Menu

The Console title bar has a trash icon on the right side that clears all displayed text from the output area. Your variables, data, and loaded packages remain in memory; this only tidies the screen.

Full command history is available from the More menu by navigating to History. The History screen lets you search, browse, and re-run past commands across all sessions.