how about using this:
tbl %>%
as_gt() %>%
fmt(
columns = everything(),
fns = function(x) {
# Convert numeric values to use comma as decimal separator
ifelse(is.numeric(x),
format(x, decimal.mark = ",", big.mark = "."),
x)
}
)
Or even transforming the table before gt:
tbl <- tbl %>%
mutate(across(where(is.numeric),
~format(., decimal.mark = ",", big.
Or even using string replace:
tbl %>%
as_gt() %>%
text_transform(
locations = cells_body(),
fn = function(x)) {
str_replace(as.character(x), "\\.", ",")
}
)
Could you provide some test data?