如何使输出并排对齐?我尝试了fluidRow列,但它不起作用(第二个表出现在第一列中)。
这是我的应用程序的图片。
和标签代码:
tabPanel("Wavelet Coefficients", htmlOutput("tmod1"),
tableOutput("wsf"), tableOutput("wbf"), htmlOutput("tmod2"),
tableOutput("vsf"), tableOutput("vbf")),
提前谢谢你
发布于 2016-11-06 03:31:05
布局的详细概述如下:RStudio:应用程序布局指南。
本质上,您需要的是使用shiny::fluidRow()
定义行,然后使用shiny::column()
将行划分为列。总宽度等于12后的引导惯例。
看看你的例子,我试着把它拆分成7/5,但要由你来校准布局。
您的代码应该修改如下:
tabPanel("Wavelet Coefficients",
fluidRow(htmlOutput("tmod1")), # Header, I presume ?
fluidRow(
column(width = 7, tableOutput("wsf")),
column(width = 5, tableOutput("wbf"))),
fluidRow(htmlOutput("tmod2")), # Header #2, I presume ?
column(width = 7, tableOutput("vsf")),
column(width = 5, tableOutput("vbf"))
)
`
下面是工作示例中的代码,可以在这里找到:https://github.com/Gnolam/stackoverflow-examples/tree/master/Shiny-2-columns
tabPanel(
"2 columns",
fluidRow(
column(width = 4,
h2("Column #1"),
plotOutput("distPlot")),
column(width = 8,
h2("Column #2"),
DT::dataTableOutput('tbl'))
))
如果有帮助,请告诉我。
https://stackoverflow.com/questions/40438390
复制相似问题