rstudio/gt

`cols_align_decimal()` does not work for scientific numbers

Open

#1,672 创建于 2024年5月21日

在 GitHub 查看
 (0 评论) (0 反应) (1 负责人)R (2,146 star) (222 fork)batch import
Difficulty: [2] IntermediateEffort: [2] MediumFocus: HTML OutputGood First IssuePriority: [3] HighType: ☹︎ Bug

描述

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

贡献者指南

`cols_align_decimal()` does not work for scientific numbers · rstudio/gt#1672 | Good First Issue