How do I show Whitespace in a rendered DataTable on a Shiny App?
When running the App below - the user can double click to edit a cell and see the leading whitespace in the dataframe 'values'.
I dont know how to make the whitespace visible otherwise though!
library(shiny)
library(DT)
ui = fluidPage(dataTableOutput("mytable"))
server = function(input, output){
values = data.frame(Demographics = c("Total", "Split_A", "Split_B", "Split_B1", "Split_B2"),check.names = F)
output$mytable <- renderDT(
values,
selection = 'none',
rownames = FALSE,
escape = FALSE,
editable = T
)
}
shinyApp(ui, server)