Open aghaynes opened 7 months ago
I have this working locally now:
library(gtExtras)
d <- tibble::tribble(
~a, ~b,
"a", 1,
"b", 2,
"c", NA,
"d", NA,
)
d |>
#mutate(b = ifelse(is.na(b), "", b)) |>
gt() |>
sub_missing(missing_text = "") |>
gt_badge(b,
palette = c("red", "blue"),
rows = !is.na(b))
Prework
Proposal
It would be nice to be able to set badges on only certain rows of a gt table. For instance, here's an example with missings
There are two issues here. Firstly, the
<br />
tag, which I guess might be a bug, and secondly, the badge itself on those<br />
tags, which would rather be blank instead.It would be great to be able to do something like