Example 1 – reading and writing the DOM

In this example, we're going to find out something about the state of the application from the DOM, grab it with JavaScript, and write it back to the DOM. We'll look at ui.R to put together the page and then look at the JavaScript. The server.R file is unchanged, so we will not discuss it here.

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.