Dashboard Tables

Building Dashboards with flexdashboard

Elaine McVey

Director of Data Science

Basic tables

library(knitr)

kable(my_data_df)
Building Dashboards with flexdashboard

Web-friendly tables

library(DT)

datatable(my_data_df)

Building Dashboards with flexdashboard

Eliminating row numbering

library(DT)

datatable(my_data_df, rownames = FALSE)

Building Dashboards with flexdashboard

Changing rows per page

library(DT)

datatable(my_data_df, rownames = FALSE,
                options = list(pageLength = 15))

Building Dashboards with flexdashboard

Adding buttons

library(DT)

datatable(
  my_data_df, rownames = FALSE, 
  extensions = 'Buttons', options = list(
    dom = 'Bfrtip',
    buttons = c('copy', 'csv', 'excel', 'pdf', 'print')
  )
)

Building Dashboards with flexdashboard

More information on DT

Building Dashboards with flexdashboard

Let's practice!

Building Dashboards with flexdashboard

Preparing Video For Download...