slackr_csv simplifies the process of sending a data frame to Slack as a CSV file.
It is highly recommended to leave the filename argument as the default (tempfile), as changing it will persist a csv file in your working directory.
slackr_csv(
data,
filename = tempfile(fileext = ".csv"),
title = basename(filename),
initial_comment = basename(filename),
channels = Sys.getenv("SLACK_CHANNEL"),
bot_user_oauth_token = Sys.getenv("SLACK_BOT_USER_OAUTH_TOKEN"),
...
)the data frame to upload
the file to save to. Defaults to a tempfile. Using the default is highly advised, as using a non-tempfile will write a file that persists on the disk (either in the working directory, or at the location specified)
title on Slack (optional - defaults to filename)
comment for file on slack (optional - defaults to filename)
Slack channels to save to (optional)
Slack bot user OAuth token
additional arguments to be passed to write.csv()
httr response object from POST call (invisibly)
httr response object from POST call (invisibly)