Exporting to MS Word with long variable names

9 views
Skip to first unread message

Stefan Mandic-Rajcevic

unread,
Oct 19, 2021, 5:18:36 AM10/19/21
to compareGroups Forum
Dear Isaac,
Thank you for your great package - I use it heavily.
I have a problem with knitting a markdown file to MS word when I have really long variable names.
I have tried setting up the "width" parameter in export2md using cm, in, px, but still the first column is too wide due to long variable text.
Here is my standard call in a chunk:
export2md(table1,
          which.table = "descr",
          header.labels = c(p.overall = "p value",
                            all = "All participants"),
          width = "5cm")

I knit using knitter. The PDF output is great and there is no problem.
Can you give me an advice on how to solve this?
Kind regards,
Stefan

Isaac Subirana

unread,
Nov 21, 2021, 3:10:56 PM11/21/21
to compareGroups Forum
Dear Stefan.

I'm glad you find the compareGroups package useful. Thanks for your kind words.

The width argument from export2md function only works when compiling the Rmarkdown file to HTML or PDF, but it is ignored when compiling to word.

Regards,

Isaac.

El dia dimarts, 19 d’octubre de 2021 a les 11:18:36 UTC+2, Stefan Mandic-Rajcevic va escriure:
Reply all
Reply to author
Forward
0 new messages