Creating Tabs on Shiny Dashboard

New to shiny so not sure if I'm missing something really obvious here, but keep getting this error when trying to add things to my sidebar.

Error in lapply(list(...), tagAssert, class = "tab-pane") :
argument is missing, with no default

Have included my code below and would really appreciate any help on this

sidebar <- dashboardSidebar(
    sidebarMenu(
      menuItem("Home", tabname = "home", icon = icon("home")),
      menuItem("Player Stats", tabName = "playerstats", icon = icon("address-book")),
      menuItem("Team Stats", tabName = "teamsstats", icon = icon("users")),
      menuItem("On/Off", tabName = "OnOff", icon = icon("strava"))
    )
  )
body <- dashboardBody(
    tabItems(
      tabItem(tabName = "home",
              h2("Welcome to HoopR")
    ),
      tabItem(tabName = "playerstats",
            h2("Player Stats")
    ),
      tabItem(tabName = "teamstats",
            h2("Team Stats")
    ),
    tabItem(tabName = "OnOff",
            h2("On/Off Splits")
    ),
  )
)

Hi, it seems you left a hanging , at the end of the tabItems. Removing it should resolve the issue.

2 Likes

I sure did, that fixed it. Thank you

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.