jack3
April 26, 2021, 1:03pm
1
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.
jack3:
sidebarPanel))
You have an extra parentheses in there
jack3
April 27, 2021, 8:28am
3
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)
ifendo
April 27, 2021, 9:31am
4
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)
system
Closed
May 18, 2021, 9:32am
5
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.