Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
TabItem输出不适用于R Shinydashboard_R_Web Applications_Shiny_Shinydashboard_Tabitem - Fatal编程技术网

TabItem输出不适用于R Shinydashboard

TabItem输出不适用于R Shinydashboard,r,web-applications,shiny,shinydashboard,tabitem,R,Web Applications,Shiny,Shinydashboard,Tabitem,我正在尝试使用Shinydashboard构建一个简单的应用程序。其中一个选项卡项(“原始数据”)不显示任何内容,当单击它时,页面也不会更改。我反复检查了语法,代码运行良好。我不明白怎么了 Ui.R- header = dashboardHeader(title="COVID-19 Tracker") sidebar = dashboardSidebar(collapsed = TRUE, sidebarMenu(menuItem("Dashboard

我正在尝试使用Shinydashboard构建一个简单的应用程序。其中一个选项卡项(“原始数据”)不显示任何内容,当单击它时,页面也不会更改。我反复检查了语法,代码运行良好。我不明白怎么了

Ui.R-

header = dashboardHeader(title="COVID-19 Tracker")

sidebar =   dashboardSidebar(collapsed = TRUE,
                   sidebarMenu(menuItem("Dashboard", tabName = "Dashboard",icon = icon("globe")),
                               menuItem("Raw Data", tabName = "Raw Data", icon = icon("database")),
                               menuItem("Graphs",tabName = "Graphs", icon = icon("chart-bar"))
                               ))
body =  dashboardBody(
  tabItems(
    tabItem(tabName = "Dashboard",
                   fluidRow(valueBox(10*3, "Cases", width = 4), 
                            valueBoxOutput("Recovered", width = 4), 
                            valueBoxOutput("Deaths", width = 4)
                            )
                   ),
    tabItem(tabName = "Raw Data", h2("Raw Data has been loaded!")
                   ),
    tabItem(tabName = "Graphs",fluidRow(
             column(
               width=4, 
               selectizeInput(
                 "country", label=h5("Country"), choices=NULL, width="100%")
             ),
             column(
               width=4, 
               selectizeInput(
                 "state", label=h5("State"), choices=NULL, width="100%")
             ),
             column(
               width=4, 
               checkboxGroupInput(
                 "metrics", label=h5("Selected Metrics"), 
                 choices=c("Confirmed", "Deaths", "Recovered"), 
                 selected=c("Confirmed", "Deaths", "Recovered"), 
                 width="100%")
             )
           ),
           fluidRow(
             plotlyOutput("dailyMetrics")
           ),
           fluidRow(
             plotlyOutput("cumulatedMetrics"))
           )
  )
)

ui = dashboardPage(header, sidebar, body)

我感谢所有的帮助

这是因为
tabName=“Raw Data”
中有空格。移除它,这样就可以工作了