opal.table_export: Export a table as a file

Description Usage Arguments See Also Examples

View source: R/opal.table.R

Description

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.

Usage

1
2
3
4
5
6
7
8
9
opal.table_export(
  opal,
  project,
  table,
  file,
  identifiers = NULL,
  id.name = "id",
  wait = TRUE
)

Arguments

opal

Opal connection object.

project

Project name where the table is located.

table

Table name to export.

file

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.

identifiers

Name of the identifiers mapping to use when exporting entities from Opal.

id.name

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

wait

Wait for import task completion. Default is TRUE.

See Also

Other table functions: 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()

Examples

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

## End(Not run)

opalr documentation built on Oct. 26, 2021, 5:06 p.m.