Set the provided annotations (as the one that can be retrieved from opal.annotations) to the table's data dictionary. Variables that do not exists in the table are ignored.
Arguments
- opal
Opal object.
- datasource
Name of the datasource.
- table
Name of the table in the datasource.
- annotations
A data frame of annotations, with the expected columns: 'variable' (variable name), 'taxonomy' (the taxonomy name), 'vocabulary' (the vocabulary name) and 'term' (the term value, if NULL of NA the annotation is removed).
See also
Other datasource functions:
opal.annotations(),
opal.attribute_values(),
opal.datasource(),
opal.datasources(),
opal.table(),
opal.tables(),
opal.valueset(),
opal.variable(),
opal.variable_summary(),
opal.variables()
Examples
if (FALSE) { # \dontrun{
o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
annots <- opal.annotations(o, 'CPTP', 'Coreqx_final')
opal.annotate(o, 'CPTP', 'Cag_coreqx', annots)
opal.logout(o)
} # }