1 Introduction

RStudio Connect connects you and the work you do in R with others as never before. Only RStudio Connect provides:

  • “One button” deployment for any Shiny application, R Markdown document, or any static plot or graph to a single environment.

  • The ability to manage and limit access to the work you’ve shared with others - and easily see the work they’ve shared with you.

  • “Hands free” scheduling of updates to your documents and automatic email distribution.

For more information on running RStudio Connect in your organization please visit https://www.rstudio.com/products/connect/.

1.1 Shiny

Example Shiny application showing bus trips

Shiny is a web application framework for R that can help turn your analyses into interactive web applications. Get started by following the Shiny tutorial then visit the gallery for inspiration to use in your own dynamic visualizations.

RStudio Connect hosts your Shiny applications, allowing colleagues to interact with your data.

1.2 Plumber

Plumber is an R package that makes it easy to create API endpoints from annotated R code. For example:

## hello-world/plumber.R

#* @get /
helloEndpoint <- function() {
   "Hello, World!"
}

RStudio Connect hosts your APIs, controls access to your endpoints, and starts new instances when needed to handle high load.

1.2.1 Swagger Documentation

Example Plumber API Swagger documentation

RStudio Connect makes it easy to share your API documentation using swagger. First, you will need at least Plumber version 0.4.0. The latest stable release of Plumber can be installed with install.packages("plumber").

If you do not define a GET / handler, RStudio Connect will provide one that redirects to GET /__swagger__, a special link in Plumber that redirects to Swagger UI. To disable this, define a handler for GET /.

1.3 R Markdown

Example R Markdown report on Motor Trend road tests

R Markdown is an authoring format that enables easy creation of dynamic documents, presentations, and reports from R. It combines the core markdown syntax with embedded R code chunks.

RStudio Connect helps you publicize and distribute your R Markdown documents. Content is published to the server, where colleagues can view your work. Documents can be periodically regenerated with the results distributed via email.

1.4 Plots and Graphs

Example plot of mtcars

R has very powerful plotting and graphing capabilities. With packages like ggplot2, it is easy to produce complex, multi-layered graphics.

RStudio Connect helps you share your plots and graphs by hosting that content.

1.5 TensorFlow Model APIs

Deploying your saved TensorFlow model to Connect is easy. Once your model has been trained, save it to a directory:

# `library(tensorflow)` version
export_savedmodel(session, "mysavedmodel")

# `library(keras)` version
export_savedmodel(model, "mysavedmodel")

That directory can be deployed to connect. See Section 3.1.2