79250854

Date: 2024-12-04 10:59:43
Score: 4.5
Natty:
Report link

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?

Reasons:
  • RegEx Blacklisted phrase (2.5): Could you provide some
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Starts with a question (0.5): how
  • Low reputation (0.5):
Posted by: G-Man