【发布时间】:2016-10-28 22:15:34
【问题描述】:
我的服务器中有此代码,但未显示值 NB_ind。如果复选框被选中,它只会显示消息,如果我取消选中复选框,则根本不会出现消息“未回答此问题的人数”。
你明白为什么吗?非常感谢。
这是我的 Ui.R:
checkboxGroupInput("skin", label = "Skin color", choices = list
("01. White" = "1", "02. Black" = "2", "03. Yellow" = "3",
"04. Mixed" = "4")),
textOutput("ETH")
还有我的 Server.R:
observeEvent(input$skin,{
if (is.null(input$skin)){NB_ind <- " Number of persons who did not
answer this question"}
else {NB_ind <- " Number of persons who have checked this/these
box(es)"}
# Process for counting number of persons who answered or not the question
#selectionETH <- reactive({filter(filter(BI14, PC %in% input$dynamic &
# ETH %in% paste(input$skin,collapse=""), AGER >=
# input$age[1] & AGER <= input$age[2]))
#})
output$ETH <- renderText({NB_ind})
})
非常感谢您的帮助。
【问题讨论】: