Skip to contents

Helper function to specify UI customization, initial grid visibility states, and rendering options for the dtsmartr interactive grid widget.

Usage

dtsmartr_options(
  advanced_filter = TRUE,
  show_labels = TRUE,
  column_picker = TRUE,
  allow_export = TRUE,
  theme = "auto",
  na_string = "NA",
  hidden_columns = NULL,
  header_summary = TRUE
)

Arguments

advanced_filter

Logical. If TRUE (default), renders the multi-condition Advanced Query Builder panel.

show_labels

Logical. If TRUE (default), displays R column attributes (like 'label') in table headers.

column_picker

Logical. If TRUE (default), displays the top-right column show/hide visibility dropdown.

allow_export

Logical. If TRUE (default), displays clipboard copy buttons and the R & SQL "Query Code" generator modal.

theme

Character. Specifies the UI color theme: "auto" (default, inherits from browser settings), "light", or "dark".

na_string

Character. Custom string placeholder displayed in cells with missing values (NA or null). Defaults to "NA".

hidden_columns

Character vector. Vector of column names to hide by default on initial widget rendering.

header_summary

Logical. If TRUE (default), renders the Kaggle-style summary zone (histograms, bar charts, completeness bar) in column headers.

Value

A named list of validated configuration settings.

Examples

dtsmartr_options(advanced_filter = FALSE, hidden_columns = c("STUDYID", "USUBJID"))
#> $advanced_filter
#> [1] FALSE
#> 
#> $show_labels
#> [1] TRUE
#> 
#> $column_picker
#> [1] TRUE
#> 
#> $allow_export
#> [1] TRUE
#> 
#> $theme
#> [1] "auto"
#> 
#> $na_string
#> [1] "NA"
#> 
#> $hidden_columns
#> $hidden_columns[[1]]
#> [1] "STUDYID"
#> 
#> $hidden_columns[[2]]
#> [1] "USUBJID"
#> 
#> 
#> $header_summary
#> [1] TRUE
#> 
dtsmartr_options(header_summary = FALSE)
#> $advanced_filter
#> [1] TRUE
#> 
#> $show_labels
#> [1] TRUE
#> 
#> $column_picker
#> [1] TRUE
#> 
#> $allow_export
#> [1] TRUE
#> 
#> $theme
#> [1] "auto"
#> 
#> $na_string
#> [1] "NA"
#> 
#> $hidden_columns
#> list()
#> 
#> $header_summary
#> [1] FALSE
#>