Upload a local tibble to the R server side through Opal, assign this tibble to the provided symbol name and import it as a table into a Opal project.

opal.table_save(
  opal,
  tibble,
  project,
  table,
  overwrite = TRUE,
  force = FALSE,
  identifiers = NULL,
  policy = "required",
  id.name = "id",
  type = "Participant"
)

Arguments

opal

Opal connection object.

tibble

The tibble object to be imported.

project

Project name where the table will be located.

table

Destination table name.

overwrite

If the destination table already exists, it will be replaced (deleted, re-created with associated permissions reinstated and then imported). Otherwise the table will be updated (data dictionaries merge may conflict). Default is TRUE. See also opal.table_truncate function.

force

If the destination already exists, stop with an informative message if this flag is FALSE (default).

identifiers

Name of the identifiers mapping to use when assigning entities to Opal.

policy

Identifiers policy: 'required' (each identifiers must be mapped prior importation (default)), ignore' (ignore unknown identifiers) and 'generate' (generate a system identifier for each unknown identifier).

id.name

The name of the column representing the entity identifiers. Default is 'id'.

type

Entity type (what the data are about). Default is 'Participant'

Value

An invisible logical indicating whether the destination table exists.

Examples

if (FALSE) {
o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
cqx <- opal.table_get(o, "CPTP", "Cag_coreqx")
# do some (meta)data transformations, then save in opal's database
opal.table_save(o, cqx, "CPTP", "Cag_coreqx", overwrite = TRUE, force = TRUE)
# or overwrite data only (keep original data dictionary)
opal.table_save(o, cqx, "CPTP", "Cag_coreqx", overwrite = 'values', force = TRUE)
opal.logout(o)
}