Creating an R Shiny document

Having introduced how to make an R Markdown document and ggvis plot, we can now combine these two together in a single report. However, the interactivity property of ggvis does not work with a regular R Markdown report. Instead, we can only enable the interactivity of the plot in a Shiny document. In this recipe, we introduce how to create a Shiny document.

Getting ready

Ensure you have installed and loaded ggvis into your R session. Also, you need to complete the previous steps by storing house in your R environment.

How to do it…

Please perform the following steps to create a Shiny document:

  1. First, click File | New File | R Markdown on the menu bar:

    Figure 35: Create an R Markdown file

  2. Next, choose Shiny as the document ...

Get R for Data Science Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.