【发布时间】:2018-07-13 04:30:04
【问题描述】:
我正在开发一个闪亮的应用程序,并在下面创建了我的问题的简化版本。 Pretty much I want to have a input select of different options (A,B,C,D) and when any or all of these options are selected then prints out different texts.目前,如果我选择所有选项,则只有“Your Idael A Value is”帖子。
library(shiny)
shinyServer( function(input, output) {
output$whatever<-renderText( {
if( input$test=="a") {
("Your ideal A value is")
}
else if (input$test=="b") {
("Your ideal B value is:")
}
else if (input$test=="c") {
("Your ideal C value is:")
}
else if(input$test=="D") {
("Your idea D value is:")
}
}
)
}
)
library(shiny)
shinyUI(fluidPage(
headerPanel(title="pratice"),
sidebarLayout(
sidebarPanel(
selectInput("test",label="Test",multiple = TRUE,
choices=list("a","b","c","d")
)),
mainPanel(
textOutput("whatever")
)
)
)
)
【问题讨论】: