uioutput

How to render default plot in R shiny

我怕爱的太早我们不能终老 提交于 2020-03-25 16:06:55
问题 I have the below sample code from an application to genarate a plot and render to UI. library(shiny) ui <- fluidPage( selectInput("choice", "Choose", choices = names(mtcars)), actionButton("run", "Run"), plotOutput("some_ui") ) server <- function(input, output, session) { output$some_ui <- renderPlot({ if(input$run==0) return() withProgress(message = paste("Drawing heatmap, please wait."),{ heatmap_render(x,y) ##custom function to generate plot### }) }) } This is not a working example as it

How to observe dynamically rendered ui

浪尽此生 提交于 2019-12-04 16:58:09
So, you solve one problem and run into the next. I've now succesfully build a part of code that dynamically creates uiOutput, i.e. a number of sliders, buttons and/or textfields and the amount of them depends on a value that comes rolling out of my model in an ealier step. However, I'm pretty clueless how to observe whether they are "clicked" / "changed" by the user. Lets say, the model gives out a nr 12 then the server tells my ui to make 12 buttons. I want to know when the user pushes ANY of the buttons and WHICH button it is To give a clear example in words: if user clicks button 8, i want