tabPanel
の後にグローバル検索フィールドをnavbarPage
に登録しようとしています。可能であれば、私のすべてのテストがnavbar
の外にtextInput
を生成しているので、私は確信が持てません。光沢のあるnavbarPageの検索フィールド
rStudioの光沢のあるレイアウトガイドは、bootstrap navbar documentationを指しています。実際には正確にこれを行っていました。しかし、私は光沢のあるアプリでそれを再現することができません。
library(shiny)
ui <- shinyUI(
shiny::navbarPage('test',
shiny::tabPanel('my app',
fluidPage(
# Application title
titlePanel("Old Faithful Geyser Data"),
# Sidebar with a slider input for number of bins
sidebarLayout(
sidebarPanel(
sliderInput("bins",
"Number of bins:",
min = 1,
max = 50,
value = 30)
),
# Show a plot of the generated distribution
mainPanel(
plotOutput("distPlot")
)
))),
### Still inside navbarPage
shiny::textInput("text",
label=h3("Text input"),
value="should be inside the navbar!")
))
server <- function(input, output, session) {
output$distPlot <- renderPlot({
# generate bins based on input$bins from ui.R
x <- faithful[, 2]
bins <- seq(min(x), max(x), length.out = input$bins + 1)
# draw the histogram with the specified number of bins
hist(x, breaks = bins, col = 'darkgray', border = 'white')
})
}
shinyApp(ui, server)
これは、あなたがhttp://stackoverflow.com/questions/36360146/checkbox-widget-within-navbar-shinyを何をしたいかにいくつかの洞察力を持っていることがあります。 – emilliman5