Shiny

Prof. Eric A. Suess

Shiny

To review, here are all of the different ways in which shiny can be used to make dynamic visualizations.

  • flexdashboard
  • Shiny document
  • Shiny App in two files
  • Shiny App in one file
  • Shiny Web Application in one file and in an R Project

Where to learn about Shiny

Flexdashboard

  • Check out the flexdashboard website.

  • To create a new flexdashboard we will install the package flexdashboard and then load an R Markdown Template.

  • To load a flexdashboard template.

    File > New File > R Markdown > From Template > Flex Dashboard

Flexdashboard Example

One more example, how to connect plots in a dashboard? This is called Brushing. Give this example from the flexdashboard examples a try.

Shiny document

Shiny App in two files

  • Here is my First Shiny App in two files

  • And here are the links to the two files, as in the book.

  • To create a Shiny App in two files in R Studio.

    File > New File > Shiny Web App > Mutliple File (ur.R/server.R)

Shiny App in one file

  • Here is my First Shiny App in one file.

  • To create a Shiny App in two files in R Studio.

    File > New File > Shiny Web App > Single File (app.R)

Shiny Web Application in one file and in an R Project

  • Alternatively, you can create an R Project containing a Shiny App in one file.

    Project > New Project > New Directory > Shiny Web Application