Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(shiny)
- predict <- function(foo_or_bar) { ifelse(foo_or_bar, 'Foo', 'Bar') }
- runApp(shinyApp(
- ui = shinyUI(fluidPage(
- fluidRow(
- column(12, checkboxInput('foo_or_bar', 'Foo or bar?'), textOutput('text'))
- )
- )),
- server = shinyServer(function(input, output) {
- output$text <- renderText({ predict(input$foo_or_bar) })
- })
- ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement