Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spanner heights is not the same for all spanners #1477

Open
olivroy opened this issue Nov 2, 2023 · 1 comment
Open

spanner heights is not the same for all spanners #1477

olivroy opened this issue Nov 2, 2023 · 1 comment

Comments

@olivroy
Copy link
Collaborator

olivroy commented Nov 2, 2023

The spanner height doesn't seem respected.

gt::gt(
  data = structure(list(
    FEATURES = c(
      "Gene1", "Gene2", "Gene3", "Gene4",
      "Gene5"
    ), CONTRASTS = c(
      "condition: 1 vs. 0", "condition: 1 vs. 0",
      "condition: 1 vs. 0", "condition: 1 vs. 0", "condition: 1 vs. 0"
    ), LIMMA.ESTIMATE = c(
      0.325357591624977, 0.294376649868767,
      -0.372112777793342, -0.47107999497371, -0.0933117711552145
    ),
    LIMMA.P_VALUE = c(
      3.06628859857087e-06, 2.8253129711711e-06,
      0.000419232793116877, 0.00199991913409095, 0.0350903776632474
    ),
    LIMMAS.ESTIMATE = c(
      0.325357591624977, 0.294376649868767,
      -0.372112777793342, -0.47107999497371, -0.0933117711552145
    ),
    LIMMAS.P_VALUE = c(
      3.06628859857087e-06, 2.8253129711711e-06,
      0.000419232793116877, 0.00199991913409095, 0.0350903776632474
    ),
    `VERY VERY VERY LONG COUNTS.MEAN` = c(
      21433.0459458001, 21664.5137266682, 22887.6046442154,
      19977.4641196898, 14634.8752065793
    ), `VERY VERY VERY LONG COUNTS.SD` = c(
      8287.40744333268,
      7589.84039964603, 10130.2519032155, 10677.3719374534, 2578.44599379548
    )
  ), row.names = c(NA, 5L), class = c("data.frame"))
) |>
  gt::tab_spanner_delim(
    delim = ".",
    columns = dplyr::matches("DESEQ2.|LIMMA.|GLMM.|COUNTS.|ES.|LM.|LIMMAS."),
    split = "last"
  )

image

I would expect all spanner lines to be the same height. (Edit: this was an issue in gt 0.9.0)

Originally posted by @olivroy in #1469 (comment)

@rich-iannone
Copy link
Member

I admit that I don’t know yet how to solve this issue but it does seem possible and desirable to solve given what I’ve seen other table generation packages can do.

@rich-iannone rich-iannone moved this from Backlog to Next / Ready for Dev in R Markdown Team Projects May 23, 2024
@rich-iannone rich-iannone modified the milestones: v0.11.0, v0.12.0 Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Next / Ready for Dev
Development

No branches or pull requests

2 participants