1
這裏是我的代碼:[R閃亮 - 一個tabpanel和輸出
shinyServer <- function(input, output) {
output$text_out <- renderText({
paste("You have selected", input$text_input)
})
}
shinyUI <- fluidPage(
titlePanel("censusVis"),
fluidRow(
column(3, textInput('text_input', label = 'some label', value ='')),
column(9,
tabsetPanel(
tabPanel('result',
fluidRow(
column(12, h3('Test_header'),
textOutput('text_out')
)
)
),
tabPanel('some panel', tableOutput('table')),
tabPanel('another panel', tableOutput('table'))
)
)
)
)
shinyApp(ui=shinyUI, server = shinyServer)
它的工作原理,但它並沒有顯示線"You have selected"
,如果我評論在代碼tabPanel('another panel', tableOutput('table'))
以下行,然後行"You have selected"
顯示出來。你知道什麼是錯的,爲什麼tabPanel影響輸出?