rstudio/gt

`cols_align_decimal()` does not work for scientific numbers

Ouverte

#1 672 ouverte le 21 mai 2024

 (0 commentaire) (0 réaction) (1 personne assignée)R (222 forks)batch import
Difficulty: [2] IntermediateEffort: [2] MediumFocus: HTML OutputGood First IssuePriority: [3] HighType: ☹︎ Bug

Métriques du dépôt

Stars
 (2 146 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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

Guide contributeur