Description Usage Arguments Value Note Examples
Unlike the dev_slackr
function, this one takes a ggplot
object,
eliminating the need to have a graphics device (think use in scripts).
1 2 3 4 |
plot |
ggplot object to save, defaults to last plot displayed |
channels |
list of channels to post image to |
scale |
scaling factor |
width |
width (defaults to the width of current plotting window) |
height |
height (defaults to the height of current plotting window) |
units |
units for width and height when either one is explicitly specified (in, cm, or mm) |
dpi |
dpi to use for raster graphics |
limitsize |
when TRUE (the default), ggsave will not save images larger than 50x50 inches, to prevent the common error of specifying dimensions in pixels. |
api_token |
the slack.com full API token (chr) |
file |
prefix for filenames (defaults to |
... |
other arguments passed to graphics device |
httr
response object (invisibly)
You need to setup a full API token (i.e. not a webhook & not OAuth) for this to work
Also, uou can pass in add_user=TRUE
as part of the ...
parameters and the Slack API will post the message as your logged-in user
account (this will override anything set in username
)
1 2 3 4 5 | ## Not run:
slackr_setup()
ggslackr(qplot(mpg, wt, data=mtcars))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.