Introducing R in SAP Analytics Cloud

Objective

After completing this lesson, you will be able to explain how to access R in SAP Analytics Cloud.

R Visualization Overview

R Language

The R language is widely used among statisticians and data miners for developing statistical software and data analysis and can be integrated with SAP Analytics Cloud to create R visualizations.

R visualization is the powerful feature of SAP Analytics Cloud where we can use R code to create more complex charts that aren't directly available in SAP Analytics Cloud.

R Visualizations

A series of visualizations created using R code. They are various charts such as heat maps and word clouds.

R Integration with SAP Analytics Cloud

A benefit of integrating R visualizations with SAP Analytics Cloud is that it’s flexible. It's possible to change the chart type, characteristics, and depict your information in a variety of ways. With the R visualization capability, you can perform statistical and analytical analyses and create truly captivating visuals to reflect these analyses.

Once integrated, you can use SAP Analytics Cloud to:

  • Perform statistical analysis using a variety of techniques such as linear and non-linear modeling, time series analysis, and clustering.
  • Expand the visualization capability of SAP Analytics Cloud to tell even richer stories.

Using R in SAP Analytics Cloud, you can do the following:

  • Insert R visualizations into your stories.
  • Interact with your visualizations, using controls such as filters.
  • Edit your R scripts and preview visualizations.

Note

You can not only add visualizations, but you can run any kind of R script when you have validated the required libraries. Therefore, you could run a cluster model in R and then add the output as a visualization into your SAP Analytics Cloud story.

Access R in SAP Analytics Cloud

To add R visualizations to a story, you must have an R server running and connected to SAP Analytics Cloud. Your system must be configured to connect to an R runtime environment.

SAP does not provide a managed R server. To use R visualizations, you must set up your own R server with an R engine running on a cloud machine and configure it to connect to SAP Analytics Cloud.

This connection is typically handled by an administrator and includes the server or host address, port number, certificate for encryption, and user credentials.

If you don't have an R server connected to SAP Analytics Cloud, first visit Connect to an R Environment in the SAP Help Portal.

Note

See SAP Note 3576579 for more information on the depreciation of the SAP managed R server in SAP Analytics Cloud.

R Packages

There are a number of packages that you can use, but the ggplot2 package is popular and worth exploring as a starting point.

Depending on the package you install, you can create different types of plot, for example:

  • Static outputs when using ggplot2 or lattice.
  • Interactive outputs when using plotly, highcharter, networkD3, or DT.