convert_to_code: Reverse plot

Description Usage Arguments Value

Description

Reverse plot

Usage

1
2
convert_to_code(p, ggplot_data_name = "ggplot_data_name",
  layer_data_names = NULL)

Arguments

p

ggplot2 plot object

ggplot_data_name

name of primary data source. An attempt is made to find the actual name of the data variable by comparing the data stored in the plot object against all variables in the object's plot_env. If no matching data is found, then ggplot_data_name is used as the name of the data variable.

layer_data_names

name of layer data sources. If a layer simply inherits the root data source, then no name is needed. Otherwise, an attempt is made to find the actual name of the data variable by comparing the data stored in the plot layer against all variables in the plot's plot_env. If no matching data is found, then layer_data_name is used as the name of the data variable.

Value

text to create the given plot


coolbutuseless/ggreverse documentation built on June 4, 2019, 5:12 p.m.