Using R with SAP Analytics Cloud

You can use SAP Analytics Cloud to create and edit visualizations based on R scripts.

R is an integrated suite of software that includes packages for advanced visualizations and statistics.
Caution

R visualizations are supported in restricted scenarios. Check the following details.

Therefore, if you're building analytic applications or optimized stories, we strongly recommend using custom widgets to create your custom visualizations. For more information about custom widgets, see Use Custom Widgets in Analytic Applications.

You can perform the following tasks with R visualizations:
  • Insert R visualizations into your stories.
  • Interact with your visualizations, using controls such as filters.
  • Edit your R scripts and preview visualizations.
  • Share stories containing R visualizations with other users. With the R visualization capability, users are able to perform statistical and analytical analyses and create charts reflecting these analyses. These visualizations remain interactive and consider the row-level security of users.
    Note
    Both new models types and classic account models are supported. For more information on the new model types and classic account models, see Get Started with the New Model Type.
    Note
    You can’t use a model with either currency or currency conversion as input data when creating an R visualization.
    Note
    If third-party cookies are not permitted in a Safari on Mac R environment, visualizations based on HTML content are not supported. If third-party R packages with certain HTML features are used, not all the contents can be exported to PDF.
    Caution
    In the R environment managed by SAP, the Shiny R package isn’t supported due to public network access security considerations.
    Note
    You can embed R visualizations of HTML contents in the host HTML page by adding it as a trusted origin in Start of the navigation path System Next navigation step  Administration Next navigation step App IntegrationEnd of the navigation path. However, this is only supported on non-SAP data centers. A two-digit number in your SAP Analytics Cloud URL, for example eu10 or us30, indicates a non-SAP data center..
    Note
    To use R capabilities in SAP Analytics Cloud, your system must be configured to connect to an R runtime environment. For more information on connecting to an external R environment, see Connect to an R Environment. You can also run scripts on an R server runtime environment provided by SAP, which is available to tenants operating through the following data centers AP1, AP10, AP11, AP12, BR1, BR10, CA1, CA10,EU1, EU2, EU10, EU11 JP1, JP10, US1, US2, US3and US10. For a list of packages, see https://blogs.sap.com/2020/03/18/r-packages-for-sap-analytics-cloud/.
    Note
    Your SAP Analytics Cloud URL indicates which data center you are connected to.
The following resources are provided to help users:
  • The requisite code snippet for listing all the available packages installed on your R system.
  • Sample R scripts for visual statistical analysis.
  • A dashboard containing an R script editor, a snapshot of the environment after the R script is run, a console containing the output of the executed script, and a preview screen for the visualization.