如何解决无法在闪亮仪表板的主面板中显示图形
我尝试在闪亮仪表板的主面板中显示直方图。直方图应出现在 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 举报,一经查实,本站将立刻删除。