slackr_save: Save R objects to an RData file on Slack

View source: R/slackr_save.R

slackr_saveR Documentation

Save R objects to an RData file on Slack

Description

slackr_save enables you upload R objects (as an R data file) to Slack and (optionally) post them to one or more channels (if channels is not empty).

Usage

slackr_save(
  ...,
  channels = Sys.getenv("SLACK_CHANNEL"),
  file = "slackr",
  token = Sys.getenv("SLACK_TOKEN"),
  initial_comment = NULL,
  title = NULL,
  thread_ts = NULL
)

Arguments

...

objects to store in the R data file.

channels

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

file

filename (without extension) to use.

token

Authentication token bearing required scopes.

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

See Also

slackr_setup(), slackr_dev(), slackr_upload()

Examples

## Not run: 
slackr_setup()
slackr_save(mtcars, channels = "#slackr", file = "mtcars")

## End(Not run)

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