How to modify data in shiny app

I need run my shiny app with data parameter. So I've encapsulated the shiny app as a function, such as:

  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?

Hi @tanhuobin, hopefully this helps:

  app <- shinyApp(
    ui = fluidPage(
    server = function(input, output) {
      output$table = renderTable(data)
    onStart = function()data

I think you may find some useful info/discussion in this github issue of shiny:

Thanks for your relpy.
I think you misunderstand my question. I can pass paremeters to shinyapp, however, my question is how to return values what were modified in the shinyapp? In other words, I need to save the modifed values in the shinyapp to current workspace.

Thanks for your reply. I'll try it.