inst/example/storeInputs/server.R

server <- function(input, output, session) {

  output$distPlot <- renderPlot({
    # generate bins based on input$bins from ui.R
    x <- faithful[, 2]
    bins <- seq(min(x), max(x), length.out = input$bins1 + 1)

    # draw the histogram with the specified number of bins
    hist(x, breaks = bins, col = "green", border = "red")
  })


  #to delete storage
  #clearStore("application501")

  #insert at the bottom  !!!IMPORTANT
  appid = "application501"
  setupStorage(appId = appid,inputs = TRUE)

  observeEvent(input$clear1,{
  clearStore(appId = appid)
  })

}

Try the shinyStorePlus package in your browser

Any scripts or data that you put into this service are public.

shinyStorePlus documentation built on June 8, 2025, 1:24 p.m.