rstudio/gt

`cols_align_decimal()` does not work for scientific numbers

Open

#1672 aperta il 21 mag 2024

Vedi su GitHub
 (0 commenti) (0 reazioni) (1 assegnatario)R (222 fork)batch import
Difficulty: [2] IntermediateEffort: [2] MediumFocus: HTML OutputGood First IssuePriority: [3] HighType: ☹︎ Bug

Metriche repository

Star
 (2146 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor