if (FALSE) {
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)
}
Run the code above in your browser using DataLab