Skip to contents

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.

Usage

mascot_studio(view = "studio", ..., fn = NULL, character = "tessa", run = TRUE)

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. NULL starts on the canvas with mascot_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 of mascot(). A checked character object or a helper carrying one is refused with advice to use mascot_preview() or mascot() to display it. Checked objects come from mascot_read_character() or mascot_check_character().

run

A logical flag. TRUE launches in an interactive R session; FALSE returns 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

Experimental interface

Experimental

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