Later versions of Shiny added support to draw tables using the wonderful DataTable jQuery library. This will enable your users to search and sort through large tables very easily. To see DataTable in action, visit the homepage at http://datatables.net/ or run the application featured in this chapter.
The package can be installed using install.packages("DT") and needs to be loaded in the preamble to the server.R and ui.R file with library(DT). Once this is done, using the package is quite straightforward. There are two functions: one in server.R (renderDataTable) and one in ui.R (dataTableOutput). They are used as follows:
### server. R output$countryTable = renderDataTable({
mapData %>%
filter(year == 2007) %>%
select(-c(lon, lat))
}) ### ui.R tabPanel("Table", dataTableOutput("countryTable"), value...