R/webshot_shiny.R
webshot_shiny.Rd
The webshot_shiny()
function is designed to create the screenshot image of
a Shiny application, with an icon suggesting to click on it for launching
the application. The image created can then be used by launch_shiny()
in
a bookdown to differ the start of Shiny application, while displaying useful
information to the user (how the Shiny application would look like if it was
started).
The URL to launch the Shiny app. If both app =
and baseurl =
The name of the Shiny application. are provided, you don't need to specify it.
The directory without trailing "/" where images relative
to Shiny applications are stored. By default, it is relative to current
directory, in images/shinyapps
subdirectories.
The path to the image that is created. Not needed if app =
and
imgdir =
are provided.
The requested weight of the screenshot (it may differ if the Shiny application defines other (limit) values.
The requested height of the screenshot (idem).
The offset from left where to place the click icon in pixels.
The offset to bottom where to place the click icon in pixels.
Time to wait (in sec) after the Shiny application has started and before the screenshot is taken. If the screenshot does not contain the complete application UI, try increase this value.
Further arguments passed to launch_shiny()
but not used here.
The path to the created image, invisibly.
if (FALSE) {
# We wait 10 sec to make sure it is loaded when the screenshot is taken
(webshot_shiny("https://phgrosjean.shinyapps.io/histogram/", delay = 10))
# Now, look at this image. You can use it with launch_shiny()
}