vincentarelbundock / modelsummary

Beautiful and customizable model summaries in R.
http://modelsummary.com
Other
911 stars 75 forks source link

issue399: \num{} in datasummary_balance #720

Closed vincentarelbundock closed 7 months ago

vincentarelbundock commented 7 months ago

TODO:

vincentarelbundock commented 7 months ago

Does not work, with or without the options.

options("modelsummary_format_numeric_latex" = "plain")
library(modelsummary)
dat <- transform(
  mtcars,
  cyl = factor(cyl),
  gear = factor(gear)
)
datasummary_balance(~am, data = dat, align = "lllllldd", stars = TRUE)
vincentarelbundock commented 7 months ago

tab_fac not wrapped in \num{} because we format with wtcpct. This may not be a problem because percentages and counts are always positive, so we don't need thw fancy negative signs provided by \num{}