rShiny textOutput and Paragraph on same line

后端 未结 2 1525
野性不改
野性不改 2021-01-12 13:18

I\'m trying to put a renderText element in the form of textOutput next to a header, but it keeps putting them on different lines.

h

2条回答
  •  温柔的废话
    2021-01-12 14:03

    You can do it using css

    ui=shinyUI(fluidPage(
    tags$head(tags$style("
                      #number{
                      display:inline
                      }")),
    h1('This is the number:',style="display:inline"), textOutput("number")
    )
    
    )
    
    server=function(input,output){
      output$number=renderText({5})
    }
    
    shinyApp(ui,server)
    

    or

    ui=shinyUI(fluidPage(
    tags$head(tags$style("
                      #container * {  
       display: inline;
                         }")),
    div(id="container",h1('This is the number:'), textOutput("number"))
    )
    
    )
    

提交回复
热议问题