Using the R Analysis App on the Researcher Workbench

  • Updated

The R Analysis Environment (aka RStudio) is available as an integrated application on the All of Us Researcher Workbench. The app runs on a virtual machine in your workspace cloud environment. 

RStudio provides a richer integrated environment for R development than the R terminal or Jupyter notebooks. The app includes a variable explorer, an R Markdown editor, a debugger, and an R terminal.

In this article, we will describe how using RStudio on the cloud can be different than on a desktop app and we’ll give step-by-step instructions to start the RStudio app, save your data, and stop the app. To learn more, read Use R Analysis Apps on the Verily Platform. Please also view our video tutorial of using RStudio in the Researcher Workbench here

Table of Contents

R Analysis Environment on the Cloud

The first step to running the R Analysis Environment is to start a cloud environment. The RStudio app runs on a virtual machine (VM) or clusters of machines in your workspace cloud analysis environment

Cloud Storage

The R Analysis Environment (aka RStudio) in the Researcher Workbench has one long term storage option, the workspace bucket. The disk attached at time of environment creation is a standard non-reattachable disk. This disk is deleted with environment deletion. Therefore, please ensure you save files to the workspace bucket to avoid data loss. 

Cloud cost

The cost of running the R analysis environment on the cloud within the Researcher Workbench depends on the environment configuration, the length of time you run the app and the size of the data that you store within your workspace bucket. In the Researcher Workbench cost will vary depending on the environment configuration and disk size. You can estimate costs by reading the article Getting Started and What to know About Costs.  

You will be charged from the time you first start the R analysis environment until it’s been deleted. You can save your work in your workspace bucket and create the app again when you are ready to use the R Analysis Environment again.

Saving your work

Two common types of analysis files are R Script (.R) and R-Markdown (.Rmd) files. You can use these files to save the code that you run and to display plots. It’s good practice to keep track of your work in the R Analysis Environment in .R and .Rmd files and save those files to your workspace bucket. Within your workspace bucket, you can share your work with workspace collaborators. 

Some features to note that will come in handy when you are using the R Analysis Environment in the cloud:

  • When you save .R and .Rmd files using the app, they will be saved to your workspace bucket.
  • You can preview .R and .Rmd files that are saved to your workspace bucket in your workspace Analysis tab. This can be helpful for sharing your work without having to start a cloud environment.

Starting RStudio

To access R analysis Environment (aka RStudio) in the Researcher Workbench, navigate to the Apps section of your workspace and select “R Analysis Environment for AoU.” You will have the option to customize your environment setting (RAM, CPU, etc), and then it will launch the application. 

RStudio.png

RStudio 2.png

The auto-stop option

When you start the R Analysis Environment app in the workbench, you have the option to use the auto-stop function, which will automatically pause your R analysis application after the specified time. Auto-stop is equivalent to pausing your environment. Cost are incurred for paused environment. Learn more by reading Cloud cost management

RStudio3.png

Other helpful material

For additional information and instructions, check out the following RStudio articles on the Verily platform:

  1. Starting and Customizing your RStudio App
  2. Using and Launching RStudio with .Rmd files
  3. Saving RStudio Data to Workspace Storage
  4. Accessing workspace data tables using AnVIL's R package

 

Was this article helpful?

7 out of 10 found this helpful

Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.