opal.table_dictionary_update {opalr} | R Documentation |
Update the dictionary of a Opal table
Description
Directly update the dictionary of a Opal table with the provided dictionary.
Usage
opal.table_dictionary_update(
opal,
project,
table,
variables,
categories = NULL
)
Arguments
opal |
Opal connection object. |
project |
Project name where the table will be located. |
table |
Destination table name. |
variables |
A data frame with one row per variable (column name) and then one column per property/attribute (Opal Excel format). |
categories |
A data frame with one row per category (columns variable and name) and then column per property/attribute (Opal Excel format). If there are no categories, this parameter is optional. |
See Also
Other table functions:
opal.perms()
,
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
opal.table_delete()
,
opal.table_dictionary_get()
,
opal.table_exists()
,
opal.table_export()
,
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()
Examples
## Not run:
o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
variables <- tibble::tribble(
~name, ~valueType, ~`label:en`, ~`Namespace::Name`, ~unit, ~repeatable, ~index,
"mpg", "decimal", "Mpg label", "Value1", "years", 0, 1,
"cyl", "decimal", "Cyl label", "Value2", "kg/m2", 0, 2,
"disp", "decimal", "Disp label", NA, NA, 1, 3
)
categories <- tibble::tribble(
~variable, ~name, ~missing, ~`label:en`, ~`label:fr`,
"cyl", "4", 0, "Four", "Quatre",
"cyl", "6", 0, "Six", "Six",
"cyl", "8", 1, "Height", "Huit"
)
opal.table_dictionary_update(o, "test", "mtcars", variables, categories)
opal.logout(o)
## End(Not run)