| opal_tables_push {mlstrOpalr} | R Documentation |
Upload datasets into an Opal environment as tables in an Opal project
Description
Uploads a dossier or dataset from the local environment to an Opal
environment. This is a wrapper function for opalr::opal.table_create(),
opalr::opal.table_save() and opalr::opal.table_dictionary_update().
Usage
opal_tables_push(
opal,
dossier = NULL,
data_dict = NULL,
dataset = NULL,
table_name = NULL,
project_name,
.force = FALSE,
.overwrite = FALSE
)
Arguments
opal |
Opal login attributes. |
dossier |
List of data frame, each of them being datasets. |
data_dict |
A list of tibble(s) representing metadata of an associated dataset. Automatically generated if not provided. |
dataset |
A tibble identifying the dataset observations associated to its data dictionary. |
table_name |
A character string specifying an Opal table name. |
project_name |
A character string specifying the Opal project name. |
.force |
If the destination already exists, stop with an informative message if this flag is FALSE (default). |
.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 FALSE.* |
Details
Opal is the OBiBa application for data management, and Opal environments can
be integrated with RStudio environments using the package opalr.
The user must have adequate credentials to interact with a specific Opal
environment. Some function errors produced may be associated with the
handler or Opal read/write permissions.
Value
A table or table(s) in Opal.
See Also
Please see Opal documentation for
complete documentation.
madshapR::as_dossier()
madshapR::as_dataset()
madshapR::as_data_dict_mlstr()
Examples
## Not run:
library(opalr)
opal <-
opal.login('administrator','password',
url ='https://opal-demo.obiba.org/')
# use madshapR_DEMO provided by the package
library(madshapR)
library(stringr)
dataset <- madshapR_DEMO$dataset_MELBOURNE
tempdir <- basename(tempdir())
try(opal_project_create(opal, tempdir))
# push a table in a project.
try(
opal_tables_push(
opal,
dataset = dataset,
table_name = 'MELBOURNE',
project_name = tempdir,
.force = TRUE,
.overwrite = TRUE))
## End(Not run)