| tinytheme_get | R Documentation |
Returns the name of the tinytheme that is currently in
effect. Handy for saving a theme and restoring it later, or for querying
the active theme programmatically.
tinytheme_get()
A thin convenience wrapper around the "tinytheme" entry of
tpar. The difference is that it always returns a plain character
string, including in a session where no theme has been set yet (where
tpar("tinytheme") returns NULL rather than "default"). Use tpar
if you want the full set of underlying theme settings, rather than just
the name.
Note that a theme passed to the tinyplot(..., theme =) argument is
ephemeral: it is reset on exit, so it is only visible to
tinytheme_get() from inside that same call (e.g. via draw).
A character string naming the active theme.
tinytheme, tinytheme_register, tpar
# no theme set yet
tinytheme_get()
# save the current theme, switch, then restore it afterwards
otheme = tinytheme_get()
tinytheme("classic")
tinytheme_get()
tinyplot(mpg ~ wt, data = mtcars)
tinytheme(otheme) # back to where we started
tinytheme_get()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.