Reputation: 109
How do I change the labels of my "filtered_data" data frame when I am rendering the Data Table. The code to render the data is below.
output$table <- DT::renderDataTable(
DT::datatable(filtered_data(), options = list(searching = TRUE,pageLength = 5,
lengthMenu = c(5, 10, 15, 20), scrollX = T))
)
This seems easy but eludes me...
Upvotes: 1
Views: 535
Reputation: 462
You are probably looking for Custom Column Names in https://rstudio.github.io/DT/
datatable(filtered_data(), colnames = c('Here', 'Are', 'Some', 'New', 'Names'))
Upvotes: 1