I am running Shiny
in R to create a GUI, and I receive the following error: ERROR: argument \"mainPanel\" is missing, with no default
Howev
The mainPanel
needs to be called inside the sidebarLayout
function. See ?sidebarLayout
:
require(shiny)
shinyUI(fluidPage(
titlePanel("Approach"),
sidebarLayout(
sidebarPanel(
fileInput('file1', 'Choose file to upload',
accept = c(
'text/csv',
'text/comma-separated-values',
'text/tab-separated-values',
'text/plain',
'.csv',
'.tsv'
)
)
),
mainPanel(
plotOutput("plot")
)
)
)
)