From the course: R: Interactive Visualizations with htmlwidgets

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Extract click information from data tables

Extract click information from data tables - R Tutorial

From the course: R: Interactive Visualizations with htmlwidgets

Start my 1-month free trial

Extract click information from data tables

- [Instructor] Shiny allows interactive web applications to be built using the R language. Let's see how it can embed a DT htmlwidget in a shiny app and extract click information from the interactive datatables that DT allows us to build. Let's have a look at a template shiny app by opening up server.r in our exercise files and clicking run app. What we see is an interactive datatable here. And what we want to be able to display is, if we select these three rows here, for this text to be replaced with a summary of the rows that we've clicked. We would also quite like it, if when we type in sender country a value and sender city, when we click on add new dummy row a row will be appended to the bottom of this datatable including these two observations. So UK, Oxford and then NA values for every other column. Before we go about plumbing this all together let's talk about how datatable objects make input variables available to shiny apps. All datatable objects in Shiny apps add additional…

Contents