Tom Tom - 2 months ago 17
R Question

How do you put multiple fluidRows() in one Shiny output?

When I try to put two fluidRows() in one output$variable, I only get the last one:

> {fluidRow(class="a"); fluidRow(class="b")}
<div class="row b"></div>


Is there a way to put two rows in one output$variable?

Answer

I'm not sure what exactly you expect, but I think thet simplest way to have multiple elements to return is using a div. Something like:

output$variable <- renderUI({
  div(
    fluidRow( class = "a"),
    fluidRow( class = "b")
   )
})

It will create something like:

<div>
  <div class="row a"></div>
  <div class="row b"></div>
</div>
Comments