Create a Shiny app from a single ggplot-like formula string. The app exposes generated controls, a draw button, inline error handling, and code output.
Usage
ptr_app(
formula,
envir = parent.frame(),
ui_text = NULL,
placeholders = NULL,
expr_check = TRUE
)Arguments
- formula
A single formula string using
ggpaintrplaceholders.- envir
Environment used to resolve local data objects when building the app.
- ui_text
Optional named list of copy overrides for UI labels, helper text, and placeholders.
- placeholders
Optional custom placeholder definitions or an existing placeholder registry.
- expr_check
Controls
exprplaceholder validation.TRUE(default) applies the built-in denylist of dangerous functions.FALSEdisables all checking. A named list withdeny_listand/orallow_listcharacter vectors supplies a custom check; when both are given, denied entries are removed from the allowlist.
Examples
app <- ptr_app("ggplot(data = mtcars, aes(x = var, y = var)) + geom_point()")
inherits(app, "shiny.appobj")
#> [1] TRUE