【发布时间】:2014-10-03 06:08:18
【问题描述】:
我在 R 中运行 Shiny 来创建 GUI,我收到以下错误:ERROR: argument "mainPanel" is missing, with no default
但是,正如您在 ui.r 文件中的以下代码中看到的那样,我确实在底部包含了 mainPanel,它应该会成功传递给 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")
)
)
)
我还确保在mainPanel 之前包含一个逗号,正如Error in RShiny ui.r argument missing 中所建议的那样
非常感谢任何建议。
【问题讨论】: