datashield.assign {opal}R Documentation

Data assignment

Description

Assign a Opal value to a R symbol in the current Datashield session.

Usage

datashield.assign(opal, symbol, value, variables = NULL, missings = FALSE,
  identifiers = NULL, async = TRUE, wait = TRUE)

## S3 method for class 'opal'
datashield.assign(opal, symbol, value, variables = NULL,
  missings = FALSE, identifiers = NULL, async = TRUE, wait = TRUE)

## S3 method for class 'list'
datashield.assign(opal, symbol, value, variables = NULL,
  missings = FALSE, identifiers = NULL, async = TRUE, wait = TRUE)

Arguments

opal

Opal object or list of opal objects.

symbol

Name of the R symbol.

value

Fully qualified name of a variable or a table in Opal (must be the same in each Opal) 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://wiki.obiba.org/display/OPALDOC/Variable+Methods

missings

If TRUE, missing values will be pushed from Opal 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 (from Opal 2.0).

async

R script is executed asynchronously within the session (default is TRUE).

wait

Wait for the R script asynchronously executed to complete (makes sense only with async=TRUE).

Value

The R command ID if the async flag is TRUE and if the wait flag is FALSE and if Opal version is at least 2.1, NULL otherwise.

Examples

## Not run: 
# assign a list of variables from table HOP of opal object o
datashield.assign(o, symbol="D", value="demo.HOP", variables=list("GENDER","LAB_GLUC"))

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

## End(Not run)

[Package opal version 2.6.0 ]