佈局的詳細介紹是在這裏:RStudio: Application layout guide。
基本上,您需要的是使用shiny::fluidRow()
定義一行,然後使用shiny::column()
將其分成若干列。 Bootstrap慣例後的總寬度等於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'))
))
請讓我知道它是否有幫助
'fluidRow'與'column'組合應該可以工作。你能發佈沒有用的代碼嗎? –