Explore the package's functions, try their controls with live feedback, and
copy the working R code into your own app. The studio needs the
suggested packages bslib (0.7.0 or later) and knitr; the "theme" view needs only bslib.
The studio is experimental and may change in a later release. What you choose in it stays
in the returned app; it changes no global options.
Arguments
- view
Which view to open:
"studio"(the default) for the studio, one page per function,"examples"for the gallery of bundled examples, or"theme"to theme one character.- ...
Must be empty. Forces the arguments after it to be named.
- fn
A function name in the studio's Guide, without parentheses.
NULLstarts on the canvas withmascot_mood()selected; a name opens that function's Guide. Used in the studio view only.- character
A built-in character id string from the studio's character selector, or a
mascot_character()helper for a built-in character. Defaults to the default character ofmascot(). A checked character object or a helper carrying one is refused with advice to usemascot_preview()ormascot()to display it. Checked objects come frommascot_read_character()ormascot_check_character().- run
A logical flag.
TRUElaunches in an interactive R session;FALSEreturns the app without launching it.
Value
With run = FALSE, a shiny.appobj object. With run = TRUE,
the value returned by shiny::runApp() after the app stops.
See also
Other mascot examples:
mascot_example(),
mascot_examples()
Examples
app <- mascot_studio(fn = "mascot_theme", run = FALSE)
#> Loading required package: shiny
#>
#> Attaching package: ‘bslib’
#> The following object is masked from ‘package:utils’:
#>
#> page
inherits(app, "shiny.appobj")
#> [1] TRUE
