I need run my shiny app with data parameter. So I've encapsulated the shiny app as a function, such as:
start_group_ui<-function(data){
ui <-(...)
server <- function(input, output, session) {...}
shinyApp(ui, server)
}
In RStudio, I ran the app such as: start_group_ui(sample1)
However, in the shiny app, I'd like to modify the variable "sample1". If I ran the app such as: sample1 <- start_group_ui(sample1), then the app would stop immediately, and didn't start web interface.
How to get the modified sample1?