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.

Create interactive data tables with DT

Create interactive data tables with DT - R Tutorial

From the course: R: Interactive Visualizations with htmlwidgets

Start my 1-month free trial

Create interactive data tables with DT

- [Instructor] The DT library allows us to easily create interactive tables from data frames in R. Let's see how in our exercise files. Let's open interactive-table.R. I'll minimize my environment because I don't need to see it for now. At the top of the script file, I load the tidyverse library with Command + Enter, and then I load the DT library so I can create my interactive tables, and then on line four, I use read_csv to import my CSV file and assign it to the variable transport_data. Okay, it's now really simple for me to visualize this as an interactive table. I simply pipe transport_data into datatable. I'll hit Command + Enter, and here in our viewer, we can see our interactive table. We have automatic pagination. We're told we're seeing observations one through 10 of 399 entries, and we can page through these very easily. We have at the top of the table a global search. For instance, I could search for only various records which have TX within them. Now, quite a few people…

Contents