Last active
April 13, 2017 13:51
-
-
Save bezany/12d2601155003f03e9cc7309a8269639 to your computer and use it in GitHub Desktop.
Shiny observe in observer problem and example correct work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
ui <- fluidPage( | |
radioButtons(inputId = "userLogged", label="User Logged", choices = c("Yes", "No")), | |
actionButton("btnSave", "Save") | |
) | |
options(shiny.reactlog=TRUE) | |
server <-function(input, output, session) { | |
observeEvent(input$btnSave,{ | |
req(input$userLogged == "Yes"); | |
print(input$userLogged); | |
print("click when logged!"); | |
}); | |
} | |
shinyApp(ui = ui, server = server) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment