Argument "mainpanel" is missing with no default

Hello,

I am having trouble with this error when I run the app:
Error in sidebarLayout(sidebarPanel) :
argument "mainPanel" is missing, with no default.

Code as below:

library(shiny)

ui <- fluidPage(
sidebarLayout(
sidebarPanel))

mainPanel(
tabsetPanel(type = "tab",
            tabPanel("Help", tags$img(src = "Mclaren.jpg")))
  
)

server <- function(input, output, session) {
  
}

shinyApp(ui, server)

Can anyone assist with this?
All I am trying to do is create a tab with an image on it.

You have an extra parentheses in there

Thank you, however - I get the same result once this parenthesis is removed (Error in sidebarLayout(sidebarPanel) :
argument "mainPanel" is missing, with no default).

Code:

library(shiny)

ui <- fluidPage(
sidebarLayout(
sidebarPanel),
mainPanel(
tabsetPanel(type = "tab",
tabPanel("Help", tags$img(src = "Mclaren.jpg")))
))

server <- function(input, output, session) {

}

shinyApp(ui, server)

need something like below:

library(shiny)

ui <- fluidPage(
  sidebarLayout(
    sidebarPanel(), # use the default empty sidebarPanel
  mainPanel(
    tabsetPanel(type = "tab",
                tabPanel("Help", tags$img(src = "Mclaren.jpg")))
  ))
)

server <- function(input, output, session) {
  
}

shinyApp(ui, server)

This topic was automatically closed 21 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.