Thanks for the detailed reply!
As for data included in the package, you're right, it make sense to go the usethis::use_data way, document and export, as one would do with other data included in the package, I'm taking this on board.
As for passing data to the shiny app, your last point and the functions described in your thoughtful post is what really nails it for me.
What I used to do earlier in order to be able to retrieve arguments that could be defined at launch of a shiny app that was part of a package was basically to include a wrapper function with a call to shinyApp() and all the code of the app inside it. Like this:
run_my_app <- function(data, option_x = FALSE, option_y = TRUE) {
shiny::shinyApp(ui =
#all ui code
,
server =
#all server code
)
}
Arguments could still be retrieved inside the shinyApp(). Needless to say, this "everything and the kitchen sink" approach made reading and changing the code a pain. In principle, with proper use of modules, it could still turn out to be decent, I suppose.
But the new get_golem_options() approach seems to deal with this in a much nicer way. I'll give it a try soon, but it really looks like it does what I need.
Thank you so much again for the thoughtful reply and for all the work on golem!