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

View source: R/slackr_dev.R

slackr_devR Documentation

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"),
  token = Sys.getenv("SLACK_TOKEN"),
  file = "plot",
  initial_comment = NULL,
  title = NULL,
  thread_ts = NULL
)

Arguments

channels

Comma-separated list of channel names or IDs where the file will be shared.

token

Authentication token bearing required scopes.

file

prefix for filenames (defaults to plot).

initial_comment

The message text introducing the file in specified channels.

title

Title of file.

thread_ts

Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead.

Value

httr response object from POST call

Author(s)

Konrad Karczewski (ctb), Bob Rudis (aut)

References

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

See Also

slackr_setup(), slackr_save(), slackr_upload()

Examples

## Not run: 
slackr_setup()

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

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

## End(Not run)

hrbrmstr/slackr documentation built on Nov. 10, 2023, 5:32 p.m.