Skip to content

Support data of class logical for data_color() #2131

@retodomax

Description

@retodomax

It would be great if the function gt::data_color() would support columns of class logical by default (without having to convert them to another class).

library(gt)
data.frame(l = c(TRUE, FALSE, TRUE)) |>
  gt() |>
  data_color()
#> Error in data_color(gt(data.frame(l = c(TRUE, FALSE, TRUE)))): object 'color_fn' not found

Created on 2026-03-11 with reprex v2.1.1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions