opal.assign.table {opal}R Documentation

Data assignment to a data.frame

Description

Assign a Opal table to a data.frame identified by a R symbol in the current R session.

Usage

opal.assign.table(opal, symbol, value, variables = NULL, missings = FALSE,
  identifiers = NULL, id.name = NULL, updated.name = NULL,
  class = "data.frame", async = FALSE)

Arguments

opal

Opal object or list of opal objects.

symbol

Name of the R symbol.

value

The value to assign evaluated in the following order: a fully qualified name of a variable or a table in Opal.

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.

identifiers

Name of the identifiers mapping to use when assigning entities to R (from Opal 2.0).

id.name

Add a vector with the given name representing the entity identifiers (from Opal 2.6). Default is NULL.

updated.name

Add a vector with the given name representing the creation and last update timestamps (from Opal 2.6). Default is NULL.

class

The data frame class into which the table is written: can 'data.frame' (default and fallback) or 'tibble' (from Opal 2.6).

async

R script is executed asynchronously within the session (default is FALSE). If TRUE, the value returned is the ID of the command to look for (from Opal 2.1).

Examples

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

# assign a table HOP with a identifiers column
opal.assign.table(o, symbol="H", value="demo.HOP", id.name="id")

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

## End(Not run)

[Package opal version 2.6.0 ]