无法在闪亮仪表板的主面板中显示图形

问题描述

我尝试在闪亮仪表板的主面板中显示直方图。直方图应出现在 dashboardBody> "Analyse de la concurrence" > "Part de marchés" 中。直方图由 in dashboardBody > in the second tabItem > in the second fluidRow > in the first Box

计算 output$hist
## app.R ##
library(shiny)
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(title = "Analyses de la concurrence inter-hospitalière en IDF"),dashboardSidebar(width = 300,sidebarMenu(
                     menuItem("Analyse des profils d'activité des hôpitaux",menuSubItem("Tableaux/Barplot",tabName = "tab"),menuSubItem("Cartes",tabName = "carte")),menuItem("Analyse de la concurrence",menuSubItem("Zone de recrutement",tabName = "Zrecrut"),menuSubItem("Part de marchés",tabName ="Market"),menuSubItem("Flux des patients",tabName ="Flow"),menuSubItem("Indice de Herfindahl-Hirschmann",tabName ="hhi")),menuItem("Analyse de trajectoires")
                   )),dashboardBody(
    tabItems(
      # First tab content
      tabItem(tabName = "Zrecrut",fluidRow(
                Box(selectInput(inputId = "Hopital1",choices = c(LETTERS),label = "Choisir l'hôpital 01" )),Box(selectInput(inputId = "Hopital2",label = "Choisir l'hôpital 02" ))
              ),fluidRow(Box(plotOutput("histogram")),Box(plotOutput("histogram")))
      ),tabItem(tabName = "Market",label = "Choisir l'hôpital 1" )),label = "Choisir l'hôpital 2" ))
              ),fluidRow(
                Box(title = "HISTOGRAMME D'UNE disTRIBUTION norMALE",collapsible = TRUE,plotOutput("hist")
                ),Box(leafletoutput("MktShareCHIV"))
              )
      ),tabItem(tabName = "Flow",fluidRow(
                Box(selectInput(inputId = "Hopital3",label = "Choisir l'hôpital 3" )),Box(selectInput(inputId = "Hopital4",label = "Choisir l'hôpital 4" ))
              ),tabItem(tabName = "hhi",label = "Choisir l'hôpital 5" )),label = "Choisir l'hôpital 6" ))
              ),Box(plotOutput("histogram")))
      )
      
    )
  )
)

server <- function(input,output) {
  output$hist({
    hist(rnorm(100,100,5))
  })
}

shinyApp(ui,server)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)