Export a table as file in the specified format. The file destination is in the Opal server file system. See opal.file_download to download the file locally. See also opal.table_get to get directly the table as an R object.
opal.table_export(
opal,
project,
table,
file,
identifiers = NULL,
id.name = "id",
wait = TRUE
)
Opal connection object.
Project name where the table is located.
Table name to export.
Destination file in the Opal file system. The expected file extensions are: rds (RDS), sav (SPSS), zsav (SPSS compressed), sas7bdat (SAS), xpt (SAS Transport), dta (Stata).RDS (serialized single R object) is to be read by base::readRDS(), while other formats are supported by the haven R package.
Name of the identifiers mapping to use when exporting entities from Opal.
The name of the column representing the entity identifiers. Default is 'id'.
Wait for import task completion. Default is TRUE.
Other table functions:
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
opal.table_delete()
,
opal.table_dictionary_get()
,
opal.table_dictionary_update()
,
opal.table_exists()
,
opal.table_get()
,
opal.table_import()
,
opal.table_perm_add()
,
opal.table_perm_delete()
,
opal.table_perm()
,
opal.table_save()
,
opal.table_truncate()
,
opal.table_view_create()
,
opal.table_view_update()
if (FALSE) {
o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
cqx <- opal.table_export(o, "CNSIM", "CNSIM1",
file = "/home/administrator/cnsim1.sav")
opal.logout(o)
}