【发布时间】:2021-03-10 02:58:46
【问题描述】:
我对 Shiny R 还很陌生!我想我可能缺少括号,但我一直在检查,但找不到错误。抱歉发布这么多代码!但是,如果你们可以检查我可能缺少括号的位置,是否有可能?
ui <- fluidPage(
navbarPage(title = "Demo Bar",
tabPanel("Percent college",
sidebarLayout(
sidebarPanel(
selectInput(inputId = "state", label = "Select a state:",
choices = unique(midwest$state),
selected = "IL",
multiple = TRUE),
hr(),
helpText("Data From Midwest data frame"),
textInput(inputId = "title", label = "Write a title!", value = "Midwest scatter plot comparison"),
),
mainPanel(
plotlyOutput("scatterplot")
),
),
),
tabPanel("Data Page",
sidebarLayout(
sidebarPanel(
sliderInput(
inputId = "area_choice",
label = "Range of Area",
min = area_range[1],
max = area_range[2],
value = area_range
),
mainPanel(
plotOutput("plot")
),
),
),
),
),
)
【问题讨论】:
-
您的最后一个
mainPanel在sidebarPanel内。