async | R Documentation |
Create an async function, that returns a deferred value, from a
regular function. If fun
is already an async function, then it does
nothing, just returns it.
async(fun)
fun |
Original function. |
The result function will have the same arguments, with the same default values, and the same environment as the original input function.
Async version of the original function.
f <- function(x) 42
af <- async(f)
is_async(f)
is_async(af)
f()
synchronise(dx <- af())
dx
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.