if (FALSE) { # interactive()
library(shiny)
df <- data.frame(
name = c("Alice", "Bob"),
age = c(25, 30),
completed = c(TRUE, FALSE)
)
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
filterInput(df)
),
mainPanel(
verbatimTextOutput("output_all"),
verbatimTextOutput("output_subset")
)
)
)
server <- function(input, output, session) {
output$output_all <- renderPrint({
get_input_values(input, df)
})
output$output_subset <- renderPrint({
get_input_values(input, c("name", "completed"))
})
}
shinyApp(ui, server)
}
Run the code above in your browser using DataLab