sendProgress | R Documentation |
During a slow remote procedure call, call this to inform the client of progress.
sendProgress(numerator, denominator = 1)
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. |
No return value
sendInfoText
for sending text to the user.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.