rstudio/gt

`cols_align_decimal()` does not work for scientific numbers

Open

#1.672 geöffnet am 21. Mai 2024

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (1 zugewiesene Person)R (222 Forks)batch import
Difficulty: [2] IntermediateEffort: [2] MediumFocus: HTML OutputGood First IssuePriority: [3] HighType: ☹︎ Bug

Repository-Metriken

Stars
 (2.146 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

When I apply cols_align_decimal() to a column that was formated using fmt_scientific(), the decimal point is not aligned (for rows where the power of 10 part is missing).

Reprex:

library(gt)
exibble["num"] |>
  gt() |>
  fmt_scientific() |>
  cols_align_decimal()

image

Contributor Guide