Convert a function that produces a plot into a Shiny app.
shiny_plot(callback = NULL, width = 500, height = 500, dlname = "plot", prefix = "", ...) shiny_plot_ui(id, width = 500, height = 500, ...) shiny_plot_server(input, output, session, callback, dlname = "plot")
callback | Function to produce the plot. In shiny_plot, this takes one argument, "env" (see composable_shiny_app). In shiny_plot_server, it takes no arguements. |
---|---|
width | Default plot width. |
height | Default plot height. |
dlname | Filename (without extension) if plot is downloaded. |
prefix | Prefix for variables in environment for composable shiny app. |
... | Extra arguments to shiny_plot and shiny_plot_ui are passed on to plotOutput, for example brushing options. |
id | Id for shiny module. |
input | Supplied by shiny::callModule. |
output | Supplied by shiny::callModule. |
session | Supplied by shiny::callModule. |
shiny_plot() returns a composable shiny.appobj.
shiny_plot is the varistran-style composable app object. shiny_plot_ui and shiny_plot_server are appropriate for the normal Shiny module system.
shiny_plot_ui
: UI part of Shiny module.
shiny_plot_server
: server part of Shiny module, to be invoked from a server function with callModule.