Reputation: 3843
I have wellPanel:
wellPanel(
h5("Accuracy table:"),
tableOutput(accuracy_tablename))
)
I want to display objects in wellPanel horizontally. How can I manage that?
Thank you in advance!
Upvotes: 2
Views: 2430
Reputation: 2785
In case you mean showing multiple panels side-by-side intead of one-below-the-other, I found the following useful:
div(style="display:inline-block",
h5("Accuracy table:"),
tableOutput(accuracy_tablename))
)
div(style="display:inline-block",
h5("Accuracy table 2:"),
tableOutput(accuracy_tablename2))
)
etc.
Upvotes: 3
Reputation: 7830
You can define a div with the class "row" (or "row-fluid") and insert sub-divs (the "spanX" class specify the space between each divs) which will be displayed horizontally.
shiny::runApp(list(
ui = basicPage(
wellPanel(
tags$div(class = "row",
tags$div(class = "span4",
h5("Accuracy table:")
),
tags$div(class = "span4",
tableOutput("table")
)
)
)
),
server = function(input, output, session) {
output$table <- renderTable({
iris[1,]
})
}
))
Upvotes: 3