ui.R

Let's look at the ui.R file necessary to achieve this. The server.R file remains the same as in the previous example. We'll take breaks as we step through the code to understand what's happening. We'll define the title a little differently here, just to make things a bit different. The actual title itself goes in the h2() HMTL helper function, and we use standard inline markup to select the font, color, and size, as shown. The title is given as an argument to the fluidPage() function; this gives the browser window its title (it's automatically set by titlePanel(), but we're not using that here):

fluidPage(  title = "Gapminder",    h2("Gapminder explorer",     style = "font-family: 'Impact'; color: purple; font-size: 32px;"), 

Now, we add in ...

Get Web Application Development with R Using Shiny - Third Edition 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.