RStudio Connect

RStudio Connect is a publishing platform for the work your teams create in R and Python. Use push-button publishing from the RStudio IDE, scheduled execution of reports, and flexible security policies to bring the power of data science to your entire enterprise.


Contents

https://arccwiki.atlassian.net/wiki/spaces/DOCUMENTAT/pages/64192662


Setup Rstudio to Access Rstudio Connect

Setup Instructions

Before you can use the Rstudio GUI to publish content to Rstudio Connect you may need to install a special Security Certificate manually. Follow the following sections to install the needed certificate.

  1. Download the security certificate to your workstation (if needed)

  2. Unzip the CA_Cert.zip file into a directory on your system.

  3. Download the security certificate file from https://web.petalibrary.arcc.uwyo.edu/support/CA_Cert.zip

  4. Follow the instructions below for your specific Operating System.

Windows

You shouldn't need to install a security certificate to get Rstudio to publish via Rstudio Connect.

macOS

On newer versions of macOS, you shouldn't need to install any additional security certificates. On older versions, you may need to do so. If you use an older Mac and need to install the security certificate run this command:

sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ~/InCommonRSAServerCA.crt

Ubuntu

You may need to have an administrator (root) permissions to complete the following.

  1. Copy the CA file (InCommonRSAServerCA.crt) to directory "/usr/local/share/ca-certificates/":sudo cp InCommonRSAServerCA.crt /usr/local/share/ca-certificates/foo.crt

  2. Update the CA store:sudo update-ca-certificates

Redhat/Centos/Scientific Linux

You may need to have administrator (root) permissions to complete the following.

  1. Install the ca-certificates package:sudo yum install ca-certificates

  2. Enable the dynamic CA configuration feature:sudo update-ca-trust force-enable

  3. Add it as a new file to directory "/etc/pki/ca-trust/source/anchors/":sudo cp InCommonRSAServerCA.crt /etc/pki/ca-trust/source/anchors/

  4. Update the CA store:sudo update-ca-trust extract

Publishing to RStudio Connect

Login Information

As a user, you can access the Rstudio Connect web site by going to web URL https://rstudio.arcc.uwyo.edu/ in your browser.

This will take you to the Rstudio Connection introduction page. To login use the "Log In" icon in the upper right corner of the page.

Once presented with the login page, use your UWYO and two-factor (2FA) password to log in.

Once logged in you will be presented with your personal Rstudio Connect dashboard. This will show you all of your published R or Python software.

Note: You need to have an ARCC IDM account before you can do this. Please contact the ARCC if you are unsure if you have an account.

Requesting Publishing Rights

When you log in for the first time you will assign the role of a "Viewer". This means you cannot publish content on the Rstudio Connect web site. You will only have "view" rights, in other words, you can only view published works.

If you intend to publish on the Rstudio Connect web site you will need to open a Team Dynamics ticket, send an email to arcc-info@uwyo.edu or send an email for ARCC help to arcc-help@uwyo.edu, requesting that your Rstudio Connect privileges be upgraded to that of "publisher". Once your privileges have been upgraded you will be notified by email.

Using RStudio to Publish to RStudio Connect

  1. You must have an R Markdown file or Shiny application file open in the source pane of RStudio.

  2. In the top right corner of the source pane, there is the option to publish the file. It appears on the screen as an icon that has a blue dot with curved lines above and below it.

  3. Once you open the RStudio publishing wizard, you must connect your RStudio to your RStudio Connect account, click "Next" to continue.

  4. When prompted to connect your account, choose the RStudio Connect option.

  5. Enter the public URL to connect to ARCC's Rstudio connect server which is https://rstudio.arcc.uwyo.edu and click next.

  6. This will bring up a browser window and prompt you to log in. enter your UWyo username and your password, a comma, and the word "push" to prompt your Duo app for your second factor.

  7. Once logged in, you can name the application that you want to publish in the RStudio GUI and publish it to the ARCC RStudio Connect server.

Binary Package Requests

When you publish your Rstudio or Python applications on the Rstudio Connection system any R modules your application requires will be installed. If any of the underlying Operating Systems packages are not installed the publish request will fail.

You will need to request that the package(s) be installed. You can make a request for the package installation by opening a Team Dynamics ticket by emailing arcc-help@uwyo.edu or send an email to arcc-info@uwyo.edu, requesting that your required package(s) be installed.

Please include in the email all output from the RStudio console window (usually the lower left window) indicating what packages are missing.

Example Output:

Preparing to deploy document...DONE Uploading bundle for document: 9...Error: * Document depends on package "leafpop" but it is not installed. Please resolve before continuing. * Document depends on package "mapview" but it is not installed. Please resolve before continuing. * Document depends on package "sf" but it is not installed. Please resolve before continuing. In addition: Warning messages: 1: In FUN(X[[i]], ...) : Failed to infer source for package 'leafpop'; using latest available version on CRAN instead 2: In FUN(X[[i]], ...) : Failed to infer source for package 'mapview'; using latest available version on CRAN instead 3: In FUN(X[[i]], ...) : Failed to infer source for package 'sf'; using latest available version on CRAN instead 4: In FUN(X[[i]], ...) : Failed to infer source for package 'sf'; using latest available version on CRAN instead 5: In FUN(X[[i]], ...) : Failed to infer source for package 'sf'; using latest available version on CRAN instead 6: In FUN(X[[i]], ...) : Failed to infer source for package 'leafpop'; using latest available version on CRAN instead 7: In FUN(X[[i]], ...) : Failed to infer source for package 'sf'; using latest available version on CRAN instead 8: In FUN(X[[i]], ...) : Failed to infer source for package 'sf'; using latest available version on CRAN instead 9: In FUN(X[[i]], ...) : Failed to infer source for package 'sf'; using latest available version on CRAN instead 10: Unable to package DESCRIPTION files: Couldn't find DESCRIPTION file for leafpop Execution halted