I am creating a matrix in my server. I would like to then output this matrix on the screen using renderTable(). (I create it in the server because its length (among others) depends on some other inputs in the ui).
As you will see with the code (or the attached picture) here below, the matrix that appears does not look good at all :it's a matrix with grey borders, rounded corners etc.
So the question: is there a way to control the appearance of the matrix ? For example, I may not want borders, I may want the rownames to be in Italics/bold etc...
shiny::runApp(
list(
ui = pageWithSidebar(
headerPanel("TEST"),
sidebarPanel(
helpText('This matrix is pretty ugly:')
),
mainPanel(
uiOutput('matrix')
)
)
,
server = function(input,output){
output$matrix <- renderTable({
matrix <- matrix(rep(1,6),nrow=3)
rownames(matrix) <- c('a','b','c')
matrix
})
}
)
)
See Question&Answers more detail:os