I am using texreg
to show regressions side-by-side, including SUR systems with systemfit
, but I have some formatting constraints/preferences. I would like to be able to round the coefficients one way, while rounding the goodness-of-fit measures to more digits. For now at least I will also be displaying confidence intervals instead of standard errors, so those are not necessarily a factor here. I also need to output this in HTML and not LaTeX format.
My issue is similar to emagar's How to show only coefficients rounded to whole numbers in LaTeX tables?, but the answer there was largely based around LaTeX tables, while I currently need to be using HTML tables, so the answer to that question, for this and other reasons, is not sufficiently applicable to my issue.
The actual function I am using to do this is actually knitreg
(since this is in R Markdown), but have generally been treating it as htmlreg
.
texreg::knitreg(
l=list(ln(...), systemfit_object),
<various formatting>,
digits=?
)
I suspect that there are several potential work-arounds, and I have already done some complex in this project for other purposes. Obviously, though, I would prefer something simpler, if possible, but really my main preference would be to able to use primarily R
-based code for this.
purr::as_mapper(~knitreg(...)
thing so that I can use thefile=
value to export to multiple formats and also can vary the digits when I call it. – Rooftreetexreg
package. But maybe thematrixreg
function could help you work towards a solution outside oftexreg
. It returns acharacter
matrix of the table. Maybe that's something you can work on in the ways you want. But then you won't have the other formatting options of the package at your disposal, such as turning the table into HTML or rounding coefficients etc. – Solicitmatrixreg
, but converting to html is pretty central to what I want to do with this, so I doubt This will be enough on its own to solve this. – Rooftree