0
假設我有光澤的應用程序是這樣的:無功輸入?
## app.R ##
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(radioButtons("Output", "Continuous or binary:",
c("Continuous" = "Continuous",
"Binary" = "Binary"),
selected = "Continuous"),
numericInput("sigma_y", "SD of y:", 0.1,
min = 0, max = NA, step = 0.01),
numericInput("mean_y", "mean_y:", 0.1,
min = 0, max = NA, step = 0.01)),
dashboardBody()
)
server <- function(input, output) { }
shinyApp(ui, server)
我如何能顯示sigma_y只有當輸出==連續和mean_y只有當輸出==二進制?
我嘗試添加if(input$Output=="Continuous")
但是,這並不工作:(
謝謝!