Chapter 4

Working with a Browser

IN THIS CHAPTER

check Introducing shiny

check Looking at a simple shiny project

check Developing your project

check Coming up with a more complex project

As I emphasize in Chapter 3, R is rich with opportunities for visualizing data. In this chapter, I show how to create R applications whose visualizations depend on user input. I also show how to present these applications in a browser so that web users can interact with them. Putting an R application in a browser is a great way to share data and analyses. And you don’t have to know HTML or JavaScript to get the job done!

Getting Your Shine On

A creation of RStudio honchos, shiny is the package that enables interactive, browser-based R applications. Use RStudio to install it in the usual way. On the Packages tab, click Install and then type shiny into the Install Packages dialog box. After the package finishes downloading, click the check box next to shiny on the Packages tab, or type

> library(shiny)

A couple of words about architecture before I move on and show how to create your first shiny project. Behind any web ...

Get R Projects For Dummies 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.