datashield.assign: Data assignment

Description Usage Arguments Examples

View source: R/datashield.assign.R

Description

Assign a table or an expression result to a R symbol in the Datashield R session.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
datashield.assign(
  conns,
  symbol,
  value,
  variables = NULL,
  missings = FALSE,
  identifiers = NULL,
  id.name = NULL,
  async = TRUE
)

Arguments

conns

DSConnection-class object or a list of DSConnection-classs.

symbol

Name of the R symbol.

value

Fully qualified name of a table reference in data repositories (see datashield.assign.table for more details) or a R expression with allowed assign functions calls.

variables

List of variable names or Javascript expression that selects the variables of a table (ignored if value does not refere to 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. Ignored if value is an R expression.

identifiers

Name of the identifiers mapping to use when assigning entities to R (if supported by 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 (TRUE means that calls are parallelized over the connections, when the connection supports that feature, with an extra overhead of requests).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# assign a list of variables from table HOP
datashield.assign(conn, symbol="D", value="demo.HOP",
  variables=list("GENDER","LAB_GLUC"))

# assign all the variables matching 'LAB' from table HOP
datashield.assign(conn, symbol="D", value="demo.HOP",
  variables="name().matches('LAB_')")

## End(Not run)

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