Table$update_variables

Table$update_variables(variables) → void

Batch update variable metadata attributes for all variables in a table.

Parameters:

variables : list(list) A list of named lists of variables to update. Each variable is represented by a named list, with a mandatory "name" property, corresponding to the variable's name, and any metadata properties to update. To clear a metadata property, set it to NULL, otherwise omit it to leave a given property unchanged.

Returns:

void

Examples:

t = redivis$table("my.table.reference")

table$update_variables(list(
    list(
        # All attrs other than "name" are optional.
        # To remove a value, set it to None
        name = "var_name",
        label = "my_label",
        description = "my_description",
        valueLabels = list(
            list(value = "1", label = "Yes"),
            list(value = "2", label = "No"),
            ...
        )
    )
    ...
))

Last updated

Was this helpful?