datashield.assign: Data assignment

Description Usage Arguments Value Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
datashield.assign(opal, symbol, value, variables = NULL,
  missings = FALSE, identifiers = NULL, async = TRUE, wait = TRUE,
  tibble = FALSE)

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

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

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).

tibble

Assign table to a tibble (from tidyverse) instead of a plain data.frame.

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

1
2
3
4
5
6
7
8
## 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)

datashield/opal documentation built on May 14, 2019, 7:53 p.m.