Learn R Programming

slackr (version 2.3.0)

slackr_dev: Send the graphics contents of the current device to a Slack channel

Description

slackr_dev sends the graphics contents of the current device to the specified Slack channel.

Usage

slackr_dev(
  channels = Sys.getenv("SLACK_CHANNEL"),
  bot_user_oauth_token = Sys.getenv("SLACK_BOT_USER_OAUTH_TOKEN"),
  plot_text = "",
  file = "plot"
)

Arguments

channels

list of channels to post image to

bot_user_oauth_token

the Slack full bot user OAuth token (chr)

plot_text

the plot text to send with the plot (defaults to "")

file

prefix for filenames (defaults to plot)

Value

httr response object from POST call

References

https://github.com/mrkaye97/slackr/pull/12/files

See Also

slackr_setup(), slackr_save(), slackr_upload()

Examples

Run this code
# NOT RUN {
slackr_setup()

# base
library(maps)
map("usa")
slackr_dev("#results", file = "map")

# base
barplot(VADeaths)
slackr_dev("@jayjacobs")
# }

Run the code above in your browser using DataLab