我想放一个renderText
元素的形式为textOutput
位于标题旁边,但它不断将它们放在不同的行上。
h1('This is the number:'), textOutput(output$number)
这也不起作用:
p(h1('This is the number:'), textOutput(output$number))
有人有解决方法吗?
你可以使用 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"))
)
)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)