O'Reilly logo

Web Application Development with R Using Shiny - Third Edition by Shitalkumar R. Sukhdeve, Chris Beeley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The UI

If you can, download and run the code and data from github.com/ChrisBeeley/gapminder (the data goes in the same folder as the code) so you can get an idea of what everything does. If you want to run the program without copying the actual data and code to your computer (copying data and code is preferable so that you can play with it), just use another function to share and run applications (we will discuss this in Chapter 5, Easy JavaScript and Custom JavaScript Functions), as shown in the following code:

runGitHub("gapminder", "ChrisBeeley")

As in many Shiny applications, ui.R is by far the simpler of the two code files, and is as follows:

library(shiny)library(leaflet)fluidPage(   titlePanel("Gapminder"),

The first thing that we do ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required