powered by
Unlike the slackr_dev() function, this one takes a ggplot object, eliminating the need to have a graphics device (think use in scripts).
slackr_dev()
ggplot
ggslackr( plot = ggplot2::last_plot(), channels = Sys.getenv("SLACK_CHANNEL"), token = Sys.getenv("SLACK_TOKEN"), file = "ggplot.png", initial_comment = NULL, thread_ts = NULL, title = NULL, ... )
httr response object (invisibly)
httr
ggplot object to save, defaults to last plot displayed.
Comma-separated list of channel names or IDs where the file will be shared.
Authentication token bearing required scopes.
Prefix for filenames (defaults to ggplot).
The message text introducing the file in specified channels.
Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead.
Title of file.
other arguments passed to ggsave
if (FALSE) { slackr_setup() ggslackr(qplot(mpg, wt, data = mtcars)) }
Run the code above in your browser using DataLab