ggplot_to_file: Convert a ggplot to a file

Description Usage Arguments

Description

Convert a ggplot to a file in a temporary location, and return the file path. The file name will be based on the variable name of the object, and will be given an extension that corresponds to the method by which the file was saved. The 'device' (eg. "png" or "jpeg") is passed to the 'ggsave' function.

Usage

1
ggplot_to_file(gg, file_format = "png", file_name = NULL, ...)

Arguments

gg

A ggplot to be converted into a file.

file_format

An argument passed onto the ggsave function that determines how the plot is saved. It is recommended to use either "png" or "jpeg". Defaults to "png".

file_name

Sets the name of the saved file, without the extension. If this isn't provided, the name of the 'data' variable will be used. "." is a forbidden 'file_name' for this function, and is usually provided by a pipe ( string of random numbers.


mdneuzerling/RDCOMOutlook documentation built on May 21, 2019, 12:21 p.m.