CircleCI GitHub CRAN status

Dash for R

Create beautiful, analytic web applications in R.

Documentation | Gallery


🛑 Make sure you're on at least version 3.0.2 of R. You can see what version of R you have by entering version in the R CLI. CRAN is the easiest place to download the latest R version.

As of 2020-06-04, dash and the currently released versions of all core component libraries are available for download via CRAN! Installing dash and its dependencies is as simple as


Users who wish to install (stable) development versions of the package as well as Dash components from GitHub may instead use install_github and specify the development branch:

install.packages(c("fiery", "routr", "reqres", "htmltools", "base64enc", "plotly", "mime", "crayon", "devtools"))

# installs dash, which includes dashHtmlComponents, dashCoreComponents, and dashTable
# and will update the component libraries when a new package is released
devtools::install_github("plotly/dashR", ref="dev", upgrade = TRUE)

Then, to load the packages in R:


That's it!

Getting Started

The R package dash makes it easy to create reactive web applications powered by R. It provides an R6 class, named Dash, which may be initialized via the new() method.


app <- Dash$new()

Similar to Dash for Python and Dash for Julia, every Dash for R application needs a layout (i.e., user interface) and a collection of callback functions which define the updating logic to perform when input value(s) change. Take, for instance, this basic example of formatting a string:


dash_app() %>%
    dccInput(id = "text", "sample"),
    div("CAPS: ", span(id = "out1")),
    div("small: ", span(id = "out2"))
  ) %>%
      output("out1", "children"),
      output("out2", "children")
    input("text", "value"),
    function(text) {
  ) %>%

Here the showcase = TRUE argument opens a browser window and automatically loads the Dash app for you.

Hello world example using dccGraph


# Create a Dash app
app <- dash_app()

# Set the layout of the app
app %>% set_layout(
  h1('Hello Dash'),
  div("Dash: A web application framework for your data."),
    figure = list(
      data = list(
          x = list(1, 2, 3),
          y = list(4, 1, 2),
          type = 'bar',
          name = 'SF'
          x = list(1, 2, 3),
          y = list(2, 4, 5),
          type = 'bar',
          name = 'Montr\U{00E9}al'
      layout = list(title = 'Dash Data Visualization')

# Run the app
app %>% run_app()

Screenshot of "Hello World" app


Try the dash package in your browser

Any scripts or data that you put into this service are public.

dash documentation built on Nov. 7, 2021, 9:06 a.m.