Hi, I am trying to display total cases in shiny dashboard header along with the text, but while trying to do so, I am getting error. Also I need to display the total cases in center of the header.
Need to display: Total Cases: 540,565
shinyApp(
ui = navbarPage("Cancer Story",theme = shinytheme("slate"), collapsible = TRUE,selected = "Home",
tabPanel("Home"),
navbarMenu("USA",
tabPanel("Types", "Type contents..."),
tabPanel("Cases", "Cases contents..."),
tabPanel("Analysis", "Modelling contents..."),
tabPanel("Top Stories", "Top stories so far")),
navbarMenu("World",
tabPanel("Historical", "Historical contents...")),
tabPanel(""),
tabPanel(""),
tabPanel("Total Cases:"),
tabPanel(textOutput("vBox"))
),
server = function(input, output) {
output$vBox <- renderText({
sum(Cancer$cases)})
})