【问题标题】:Make R Shiny sidebarLayout Larger in Height使 R Shiny sidebarLayout 的高度更大
【发布时间】:2020-06-23 10:06:14
【问题描述】:

我在 RMarkdown 中有一份报告,其中包含闪亮的应用程序以使其具有交互性(在 YAML 标头中使用运行时:闪亮)。这些应用程序夹在文本中。在这种情况下,我有一个被基本文本夹在中间的仪表板。在此处查看此图片:

我想知道是否有一种方法可以使整个仪表板的高度更长,这样用户就不必不断地上下滚动来查看侧边栏或较小图表下方地图上显示的内容。换句话说,我可以更改仪表板和/或下面的布局,以便用户不必滚动(整个仪表板与文本一起显示在页面上?)

这是我怀疑需要更改某些内容的流体页面代码...

ui2 <-  fluidPage(
  
  sidebarLayout(
    sidebarPanel(
      sliderInput("year", "Years", min(my_data$years), max(my_data$years),
                  value = range(my_data$years), step= 1, sep = ""),
      selectInput("experience", "Experience level of the operators",
                  choices = unique(na.omit(my_data$experience_levels))),
      htmlOutput("summary"),
      tableOutput("table3"),
      tableOutput("table1"),
      tableOutput("table2")
      
    ),
    mainPanel(
      fluidRow(column(4, plotOutput("plot1", width = "100%", height = "200px") ),
               column(4, plotOutput("plot3", width = "100%", height = "200px") ),
               column(4, plotOutput("plot2", width = "100%", height = "200px") ) ),
      
      
      br(),
      leafletOutput("map")
    ), 
  ))

【问题讨论】:

    标签: r shiny r-markdown


    【解决方案1】:

    解决方法是在对shinyApp的调用中指定options

    shinyApp(ui, server, options = list(height = 1300))

    【讨论】:

      猜你喜欢
      • 2019-12-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-26
      • 1970-01-01
      • 2021-10-18
      • 1970-01-01
      • 2019-12-19
      相关资源
      最近更新 更多