The help page for runApp
says:
Runs a Shiny application. This function normally does not return; interrupt R to stop the application (usually by pressing Ctrl+C or Esc).
Does "normally" mean "always"? Is there any way to add an "exit" button and return a value to the R session that called runApp
? Even if it's a hack, this would be convenient functionality. I've tried some searching but haven't found anything. I've also looked at the source for runApp
, the last line is return(.globals$retval)
, so it looks like there should be a way.
Can I set .globals$retval
directly and then call some kind of interrupt? Is there a function in the shiny
package that does this?