This function is a wrapper for txtProgressBar
.
In addition to standard txtProgressBar
functionality this function
will send message using send_message
method of the
client
argument. Parameters other than client
and ...
have the same use-case as in the txtProgressBar
(description of these
parameters was taken from txtProgressBar
documentation).
sendeR_txtProgressBar( client, min = 0, max = 1, initial = 0, char = "=", width = NA, title, label, style = 1, file = "", ... )
client | the client which will send the message. |
---|---|
min, max | (finite) numeric values for the extremes of the progress bar.
Must have |
initial | initial or new value for the progress bar. See ‘Details’
in |
char | the character (or character string) to form the progress bar. |
width | the width of the progress bar, as a multiple of the width of
char. If NA, the default, the number of characters is that which fits into
|
title, label | ignored, for compatibility with other progress bars. |
style | the ‘style’ of the bar – see ‘Details’ in
|
file | an open connection object or "" which indicates the console: stderr() might be useful here. |
... | additional parameters to be passed to the |
A progress bar object on which every method normally used on
txtProgressBar
can be used.
Note: If the client
has no fields set then the
message
and destination
have to be passed through the ellipsis
(...
).
client <- client_slack("my_webhook") pb <- sendeR_txtProgressBar(client, message = "Progress bar has finished!") if (FALSE) { for (i in 1:10) { Sys.sleep(0.5) setTxtProgressBar(pb, i / 10) } }