Reputation: 1029
I am looking for something similar in a Shiny app, that would be similar to .NET's session variables.
What I'm trying to do is to store different variables at the session level, to be used across different functions. Is there a way to do that?
Upvotes: 2
Views: 326
Reputation: 12087
The answer is in this link: http://shiny.rstudio.com/articles/scoping.html There are per-session objects and also objects across all sessions.
In this example, each session will have its own variable named startTime, which records the start time for the session:
shinyServer(function(input, output) {
startTime <- Sys.time()
# ...
})
Upvotes: 2