mlr_messenger: Simple function for sending messages to Hipchat and Slack...

Description Usage Arguments

Description

These functions make it simple to send a message to and from either Slack using the https://github.com/hrbrmstr/slackr package, or for Hipchat using the https://github.com/robertzk/hipchat package. You can set the criteria for whether the function should send a Success or Error message to a room of your choosing. No extra env variables are needed as it works of the existing config for the packages mentioned above.

Usage

1
2
3
mlr_messenger(app = "Hipchat", channel = "AppChat", success_flag = status,
  success_value = TRUE, success_message = "Success!",
  fail_message = "Failed!")

Arguments

app

- Can be either 'Hipchat' or 'Slack' #' @param channel - the room to send to. No need for # prefix on room name if using Slack

success_flag

- Can be a variable already pre-stored in your script. To use an existing value, make sure to leave it unquoted when passing to the function

success_value

- How will the fuction know to send a Success or Error message? Uses this value and evaluates it against success_flag.

success_message

- The message to send if success_flag == success_value

fail_message

- The message to send if success_flag != success_value


mitchelllisle/mlr_r_package documentation built on May 20, 2019, 4:10 p.m.