as.promise.mirai | R Documentation |
Creates a 'promise' from a 'mirai' or 'recvAio'.
## S3 method for class 'mirai'
as.promise(x)
## S3 method for class 'recvAio'
as.promise(x)
x |
an object of class 'mirai' or 'recvAio'. |
This function is an S3 method for the generic as.promise
for class 'mirai' or 'recvAio'.
polling
may be used to customise the frequency with which
to poll for promise resolution (defaults to every 100 milliseconds).
A 'promise' object.
if (interactive()) {
# Only run examples in interactive R sessions
p <- promises::as.promise(mirai::mirai("example"))
print(p)
promises::is.promise(p)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.