Created
June 19, 2013 05:01
-
-
Save trestletech/5811788 to your computer and use it in GitHub Desktop.
Bug in shiny's renderUI function?
This file contains hidden or 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
require(shiny) | |
shinyServer(function(input, output) { | |
val <- reactive({ | |
if(input$change>0) { | |
# Option 1 | |
'abc' | |
# # Option 2 | |
# isolate({ | |
# paste('abc',input$txt,"") | |
# }) | |
} else { | |
'' | |
} | |
}) | |
output$textbox <- renderUI({ | |
textInput("txt","Text",val()) | |
}) | |
}) |
This file contains hidden or 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
require(shiny) | |
require(shinyIncubator) | |
shinyUI(pageWithSidebar( | |
headerPanel('Test'), | |
sidebarPanel( | |
uiOutput("textbox"), | |
actionButton("change", "Change") | |
), | |
mainPanel( | |
) | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment