Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation tweak for onStart argument in shinyApp help page #4106

Open
tyner opened this issue Jul 26, 2024 · 1 comment
Open

documentation tweak for onStart argument in shinyApp help page #4106

tyner opened this issue Jul 26, 2024 · 1 comment

Comments

@tyner
Copy link

tyner commented Jul 26, 2024

In the help page for shinyApp it says

 onStart: A function that will be called before the app is actually
          run. This is only needed for ‘shinyAppObj’, since in the
          ‘shinyAppDir’ case, a ‘global.R’ file can be used for this
          purpose.

I suspect that where it says ‘shinyAppObj’ it should actually be ‘shinyApp’ ?

@ismirsehregal
Copy link
Contributor

ismirsehregal commented Jul 31, 2024

I think you are right.

The ‘shinyAppObj’ case refers to the possibility of defining a shiny app without using a file based app format (No app.R or ui.R and server.R files) via shinyApp().

Something like:

library(shiny)

myShinyAppObj <- shinyApp(ui = fluidPage(), server = function(input, output, session) {})
is(myShinyAppObj)
runApp(myShinyAppObj)

The file based formats are handled by shinyAppDir() or shinyAppFile() which don't provide an onStart argument. However, they still result in a shiny.appobj.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants