modelsummary icon indicating copy to clipboard operation
modelsummary copied to clipboard

Flextable + Shape and bind = Subheaders on the same line.

Open astraetech opened this issue 6 months ago • 6 comments

Hi Vincent!

Came back to modelsummary after a long while. Awesome that you are still working on it! Could you look into this please?

panels <- list(
  "Outcome: mpg" = list(
    "(I)" = lm(mpg ~ 1, data = mtcars),
    "(II)" = lm(mpg ~ qsec, data = mtcars)
  ),
  "Outcome: hp" = list(
    "(I)" = lm(hp ~ 1, data = mtcars),
    "(II)" = lm(hp ~ qsec, data = mtcars)
  )
)
        
    modelsummary(panels, shape = "cbind")
    modelsummary(panels, shape = "cbind", output=
                 "flextable")

The last line gives me the following headers: Outcome: mpg.(I) Outcome: mpg.(II) Outcome: hp.(I) Outcome: hp.(II).

loaded: modelsummary * 2.1.0.1 2024-05-21 [1] Github (vincentarelbundock/modelsummary@2bbbb1d) tinytable 0.3.0.34 2024-08-12 [1] https://vincentarelbundock.r-universe.dev (R 4.4.0)

Apologis if I missed something in the vignettes.

Thank you!

astraetech avatar Aug 16 '24 01:08 astraetech