Using the R Script Editor


After completing this lesson, you will be able to Identify the key functionality of the R script editor in SAP Analytics Cloud.

R Script Editor

The SAP Analytics Cloud R script editor is similar to the one used in RStudio.

The R script editor is a four screen panel that allows you to:

  • paste and execute your R code
  • monitor warnings and error messages
  • view data information
  • preview your visualization

R Script Editor

In the following video, learn more about the editor, console, environment, and preview panels of the R script editor in SAP Analytics Cloud.

Use Suggested Code in the R Script Editor

Suggested Code

A list of suggested code is displayed if you press Ctrl+Space, or if there are multiple suggestions based on the characters you've typed in the R script editor.

Based on your coding context, the available R functions, data frames, R packages, vectors, arguments, input parameters, and function lists appear on the left with a corresponding description (if available) on the right.

The R script editor with the suggested code list (left) with a corresponding description (if available) on the right.
  • To reference a data frame, enter the three letters of the data frame name.
  • You can use the up, down, PgUp, PgDn, Home, and End keys to navigate the displayed list of suggestions. Select a suggestion to insert it into your script.
  • If you combine a data frame name with $, a list of the column names for the data frame is displayed.

R Code Snippets

Code Snippets and Examples

Sample scripts to render R-based visualizations are provided for your convenience.

The code and visualizations rendered by these samples are for instructional purposes, but you can use these samples to generate visualizations based on your data.

R script editor with the code snippets and examples showing in the dropdown menu using the path below.

To access the snippets and examples, navigate to <> and choose Snippets or Examples.

Log in to track your progress & complete quizzes