Skip to contents

Modify column definition

Usage

modify_col_def(widget, columns, col_update)

Arguments

widget

A tabulator() HTML widget.

columns

The names of the columns the formatter is applied to.

col_update

A named list containing the updates to apply to each column in columns. The updates are merged into the existing column definitions.

Value

The updated tabulator() HTML widget

Examples


df <- data.frame(values = c(1,2,3), names = c("a","b","c"))
tabulator(df) |>
  modify_col_def(c("values","names"),
  col_update = list(hozAlign = "center"))