Learn R Programming

DSI (version 1.7.0)

dsIsCompleted: Get whether the operation is completed

Description

Get whether the result from a previous assignment or aggregation operation was completed, either with a successful status or a failed one. This call must not wait for the completion, immediate response is expected. Once the result is identified as being completed, the raw result the operation can be get directly.

Usage

dsIsCompleted(res)

Value

A logical

Arguments

res

An object inheriting from DSResult-class.

See Also

Other DSResult generics: DSResult-class, dsFetch(), dsGetInfo()

Examples

Run this code
if (FALSE) {
con <- dsConnect(DSOpal::Opal(), "server1",
  username = "dsuser", password = "password", url = "https://opal-demo.obiba.org")
dsAssignExpr(con, "C", as.symbol("c(1, 2, 3)"))
res <- dsAggregate(con, as.symbol("length(C)"), async = TRUE)
completed <- dsIsCompleted(res)
while (!completed) {
  Sys.sleep(1)
  completed <- dsIsCompleted(res)
}
length <- dsFetch(res)
dsDisconnect(con)
}

Run the code above in your browser using DataLab