Shiny show everything even the condition does not meet, for example .Platform$OS.type == 'windowsxxx'. Since I use window, so the command .Platform$OS.type will return "windows" and the condition .Platform$OS.type == 'windowsxxx' should be FALSE,but shiny seems does not evaluate this condition and shows everything inside that conditionalPanel. The example code is below, every suggestion is highly appreciated
library(shiny)
# Define UI for application that draws a histogram
ui <- 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),
conditionalPanel(
condition = ".Platform$OS.type == 'windowsxxx'",
sliderInput("breakCount", "This is a conditional sliderInput", min=1, max=1000, value=10)
)
),
# Show a plot of the generated distribution
mainPanel(
plotOutput("distPlot")
)
)
)
# Define server logic required to draw a histogram
server <- function(input, output) {
}
# Run the application
shinyApp(ui = ui, server = server)