dsAssignTable: Assign a data table

Description Usage Arguments See Also Examples

Description

Assign a data table from the data repository to a symbol in the DataSHIELD R session. The table to be assigned must exist (i.e. proper permissions apply) for the DataSHIELD user.

\Sexpr[results=rd,stage=render]{DSI:::methods_as_rd("dsAssignTable")}

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
dsAssignTable(
  conn,
  symbol,
  table,
  variables = NULL,
  missings = FALSE,
  identifiers = NULL,
  id.name = NULL,
  async = TRUE
)

Arguments

conn

An object that inherits from DSConnection-class.

symbol

Name of the R symbol.

table

Fully qualified name of a table in the data repository.

variables

List of variable names or Javascript expression that selects the variables of a table. See javascript documentation: http://opaldoc.obiba.org/en/latest/magma-user-guide/variable/

missings

If TRUE, missing values will be pushed from data repository to R, default is FALSE.

identifiers

Name of the identifiers mapping to use when assigning entities to R (if supported by the data repository).

id.name

Name of the column that will contain the entity identifiers. If not specified, the identifiers will be the data frame row names. When specified this column can be used to perform joins between data frames.

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, dsAggregate(), dsAssignExpr(), dsAssignResource(), dsDisconnect(), dsGetInfo(), dsHasResource(), dsHasTable(), dsIsAsync(), dsKeepAlive(), dsListMethods(), dsListPackages(), dsListProfiles(), dsListResources(), dsListSymbols(), dsListTables(), dsListWorkspaces(), dsRmSymbol(), dsRmWorkspace(), dsSaveWorkspace()

Examples

1
2
3
4
5
6
7
## Not run: 
con <- dsConnect(DSOpal::Opal(), "server1",
  username = "dsuser", password = "password", url = "https://opal-demo.obiba.org")
dsAssignTable(con, "D", "test.CNSIM")
dsDisconnect(con)

## End(Not run)

DSI documentation built on June 22, 2021, 5:06 p.m.