Learn R Programming

slackr (version 2.0.1)

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

Description

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

Usage

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

dev.slackr( channels = Sys.getenv("SLACK_CHANNEL"), bot_user_oauth_token = Sys.getenv("SLACK_BOT_USER_OAUTH_TOKEN"), file = "plot" )

Arguments

channels

list of channels to post image to

bot_user_oauth_token

the Slack full bot user OAuth token (chr)

file

prefix for filenames (defaults to plot)

Value

httr response object from POST call

References

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

See Also

slackrSetup, save.slackr, slackrUpload

Examples

Run this code
# NOT RUN {
slackr_setup()

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

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

Run the code above in your browser using DataLab