Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R modelsummary latex output - remove the \num{} tag

For a series of models, I would like to create a latex table/output using the R package modelsummary.

The problem is that the package wraps the output values in the \num tag which seems to create problems with our latex table format. Is there anyway that the {estimates} output can just be the plain number?

Thanks for reading and for your help. Please ask for any additional infos.

like image 880
dmort Avatar asked Nov 27 '25 18:11

dmort


1 Answers

This is documented in the "Global Options" section of the ?modelsummary documentation:

https://vincentarelbundock.github.io/modelsummary/reference/modelsummary.html#global-options-1

This information also appears as a warning the first time you produce a LaTeX table in each session.

You can just do:

options(modelsummary_format_numeric_latex = "plain")

After calling this, LaTeX tables should no longer wrap numbers in \num{}.

like image 124
Vincent Avatar answered Nov 30 '25 09:11

Vincent



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!