Creates a Shiny render function for MAIDR widgets using htmlwidgets. This provides automatic dependency injection and robust JavaScript initialization.
Usage
render_maidr(expr, env = parent.frame(), quoted = FALSE)Arguments
- expr
An expression that draws a plot. Either a ggplot object, or Base R plotting calls – their return values differ (
plot()returns NULL,barplot()returns bar midpoints) and are ignored; what counts is whether the expression drew. An expression that draws nothing and returns NULL renders nothing, per Shiny convention.- env
The environment in which to evaluate expr
- quoted
Is expr a quoted expression