Inline template code

Let's look first at the slightly simpler method, which is including the code inline within the HTML template. We'll take some elements of the Gapminder application in the previous chapter and incorporate them into an HTML template. The server.R file is unchanged, although this version is a little shorter than the previous one because we have taken out some of the outputs. For the sake of brevity, we'll again load the data that we generated in the previous chapter. If you want to see how to generate this data, have a look back at the previous chapter.

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.