Learn R Programming

DSI (version 1.7.0)

dsAggregate: Aggregate data

Description

Aggregate some data from the DataSHIELD R session using a valid R expression. The aggregation expression must satisfy the data repository's DataSHIELD configuration.

Usage

dsAggregate(conn, expr, async = TRUE)

Arguments

conn

An object that inherits from DSConnection-class.

expr

Expression to evaluate.

async

Whether the result of the call should be retrieved asynchronously. When TRUE (default) the calls are parallelized over the connections, when the connection supports that feature, with an extra overhead of requests.

See Also

Other DSConnection generics: DSConnection-class, dsAssignExpr(), dsAssignResource(), dsAssignTable(), dsDisconnect(), dsGetInfo(), dsHasResource(), dsHasTable(), dsIsAsync(), dsKeepAlive(), dsListMethods(), dsListPackages(), dsListProfiles(), dsListResources(), dsListSymbols(), dsListTables(), dsListWorkspaces(), dsRestoreWorkspace(), dsRmSymbol(), dsRmWorkspace(), dsSaveWorkspace()

Examples

Run this code
if (FALSE) {
con <- dsConnect(DSOpal::Opal(), "server1",
  username = "dsuser", password = "password", url = "https://opal-demo.obiba.org")
dsAssignTable(con, "D", "test.CNSIM")
dsAggregate(con, as.symbol("meanDS(D$WEIGHT)"))
dsDisconnect(con)
}

Run the code above in your browser using DataLab