sendProgress {shinylight} | R Documentation |
Sends a progress update to the client.
Description
During a slow remote procedure call, call this to inform the client of progress.
Usage
sendProgress(numerator, denominator = 1)
Arguments
numerator |
The progress, out of |
denominator |
What the progress is out of. You could use this for the number of known items to be completed so that each call increases either the numerator (for more items done) and/or the denominator (for more items discovered that need to be done). However, it is not necessary to be so precise; you can set the numerator and denominator however you like on each call as long as it makes sense to the user. |
Value
No return value
See Also
sendInfoText
for sending text to the user.
Examples
server <- slServer(
port = 50051,
interface = list(long_and_complicated = function(x) {
sendProgress(0,3)
# First part of work that takes some time
# ...
sendProgress(1,3)
# Second part of work that takes some time
# ...
sendProgress(2,3)
# Last part of work that takes some time
# ...
sendProgress(3,3)
})
)
# ...
slStop(server)
[Package shinylight version 1.2 Index]