parse_ggplot2_args: Parse 'ggplot2_args' object into the 'ggplot2' expression

View source: R/ggplot2_args.R

parse_ggplot2_argsR Documentation

Parse ggplot2_args object into the ggplot2 expression

Description

[Experimental] A function to parse expression from the ggplot2_args object.

Usage

parse_ggplot2_args(
  ggplot2_args = teal.widgets::ggplot2_args(),
  ggtheme = c("default", "gray", "bw", "linedraw", "light", "dark", "minimal", "classic",
    "void", "test")
)

Arguments

ggplot2_args

(ggplot2_args)
This argument could be a result of the resolve_ggplot2_args().

ggtheme

(character(1))
name of the ggplot2 theme to be applied, e.g. "dark".

Value

(list) of up to three elements of class languange: "labs", "ggtheme" and "theme".

Examples

parse_ggplot2_args(
  resolve_ggplot2_args(ggplot2_args(
    lab = list(title = "TITLE"),
    theme = list(title = ggplot2::element_text(size = 20))
  ))
)

parse_ggplot2_args(
  resolve_ggplot2_args(
    ggplot2_args(
      lab = list(title = "TITLE"),
      theme = list(title = ggplot2::element_text(size = 20))
    )
  ),
  ggtheme = "gray"
)

teal.widgets documentation built on May 29, 2024, 2:41 a.m.