Table of contents

Analyzing data with RStudio (RStudio Server with R 3.6)

R is a popular statistical analysis and machine-learning package that includes tests, models, analyses, and graphics, and enables data management. RStudio provides an IDE for working with R.

Service The RStudio Server with R 3.6 service is not available by default. An administrator must install this service on the IBM Cloud Pak for Data platform. To determine whether the service is installed, open the Services catalog and check whether the service is enabled.

RStudio

Required services
RStudio Server with R 3.6
Watson Studio
Optional service
Watson Machine Learning
Data format
All data file types in the RStudio server file structure
Tables in relational data sources
Data size
Any

RStudio and Git integration

You can use the RStudio IDE in an analytics project with or without Git integration. However, with Git integration, you can share your R scripts and Shiny apps with other users in your project.

If your project is integrated with a Git repository, then you can create Shiny apps and R scripts and pull them into the project as assets. If you have the Watson Machine Learning service installed, you can deploy your applications in a deployment space as URLs that are accessible to users. You can integrate a project with a Git repository only while you’re creating the project. See Git integration.

In a project that is not integrated with a Git repository, you can’t add scripts or Shiny apps as assets nor deploy applications from a deployment space.

Collaboration in RStudio

With the Git version control sytem added through the Git extension in RStudio, users can share their work on files in RStudio. To enable sharing when working on files, users must be added to the project as collaborators and must have access to the associated project Git repository.

To enable users in a project to collaborate on file changes in RStudio:

  1. Add users as collaborators to the project and assign them either Admin or Editor role. You can invite only users who have an existing IBM Cloud Pak for Data account. See Adding collaborators.
  2. Give all collaborators the appropriate access permissions to the project Git repository.
  3. Instruct all collaborators to create their own personal access token for the associated project repository. See Creating personal access tokens for Git repositories.

    When you open RStudio, you will see your personal Git access token in the list. Select it to begin working on the RStudio project.

Accessing RStudio

You access RStudio from within an analytics project. The RStudio IDE runs in an RStudio environment. A default RStudio environment is included with the RStudio Server with R 3.6 service. You can also create custom RStudio environment definitions if you have the execution engine for Apache Hadoop. See RStudio environments.

To start RStudio in your project:

  1. Click RStudio from the Launch IDE menu on your project’s action bar.
  2. If you created your own RStudio environments, select an environment runtime. Otherwise, RStudio runs on the Default RStudio environment runtime.
  3. If the project is integrated with a Git repository, select your token.
  4. Click Launch.

The environment runtime is initiated and the development environment opens.

If you restart RStudio after it crashed and integration to the associated Git repository is broken, the reason is that the RStudio session workspace is in an incorrect state. See Git integration broken when RStudio crashes to restore the session workspace.

Next steps

When working in a project with Git integration:

When working in a project without Git integegration:

Learn more