Closed barrettk closed 2 months ago
Im actually starting to think I didnt have knitr
installed before, and only had it for my work with the model_tree
. In which case I think this code (linked in main issue) was never running before in a development environment. Im curious if scientists have run into this when calling model_summary()
in rmarkdown
reports where knitr
is installed
so I would appreciate someone else verifying they also run into this issue (after updating all packages via
pkgr install
)
I'm not able to trigger it on current tip of main (with freshly installed packages and knitr installed).
(edit: I also tried with example2_saemimp
, which looks to be the example model in your output above)
@kyleam would you mind stepping through this section of the print code, and letting me know what param_str
is equal to before and after line 273? Im seeing that it's a vector of length 1, which is why highlight_cell
fails (no 5th index to reference). That observation is what led me to believe knitr
was involved in the issue
what
param_str
is equal to before and after line 273?
before
Browse[2]> param_str
[1] "|parameter_names |estimate |stderr |shrinkage |" "|:---------------|:--------|:--------|:---------|"
[3] "|THETA1 |3.30 |0.0327 | |" "|THETA2 |3.25 |0.0287 | |"
[5] "|THETA3 |-0.612 |0.00954 | |" "|THETA4 |-0.208 |0.00832 | |"
[7] "|THETA5 |0.737 |0.0397 | |" "|THETA6 |1.14 |0.0359 | |"
[9] "|THETA7 |0.335 |0.0115 | |" "|THETA8 |0.192 |0.0104 | |"
[11] "|THETA9 |0.692 |0.0108 | |" "|THETA10 |2.30 |0.00873 | |"
[13] "|THETA11 |0.0992 |0.00277 | |" "|OMEGA(1,1) |0.0104 |0.000970 |7.31 |"
[15] "|OMEGA(2,2) |0.00828 |0.00136 |33.7 |" "|OMEGA(3,3) |0.0131 |0.00324 |40.6 |"
[17] "|OMEGA(4,4) |0.0110 |0.00204 |27.8 |"
after
Browse[2]> param_str
[1] "|parameter_names |estimate |stderr |shrinkage |"
[2] "|:---------------|:--------|:--------|:---------|"
[3] "|THETA1 |3.30 |0.0327 | |"
[4] "|THETA2 |3.25 |0.0287 | |"
[5] "|THETA3 |-0.612 |0.00954 | |"
[6] "|THETA4 |-0.208 |0.00832 | |"
[7] "|THETA5 |0.737 |0.0397 | |"
[8] "|THETA6 |1.14 |0.0359 | |"
[9] "|THETA7 |0.335 |0.0115 | |"
[10] "|THETA8 |0.192 |0.0104 | |"
[11] "|THETA9 |0.692 |0.0108 | |"
[12] "|THETA10 |2.30 |0.00873 | |"
[13] "|THETA11 |0.0992 |0.00277 | |"
[14] "|OMEGA(1,1) |0.0104 |0.000970 |7.31 |"
[15] "|OMEGA(2,2) |0.00828 |0.00136 |\033[31m33.7\033[39m |"
[16] "|OMEGA(3,3) |0.0131 |0.00324 |\033[31m40.6\033[39m |"
[17] "|OMEGA(4,4) |0.0110 |0.00204 |27.8 |"
Going to close this issue for now since it never came up again (I recall deleting kableExtra
and everything went back to normal, though I know scientists/data scientists have had that package and bbr
installed at once (including me) without running into this issue - so I think it's safe to assume I just got into a weird state when working on the model_tree
PR)
Still looking into the exact cause, but
model_summary()
doesnt seem to print the summary correctly anymore. I assumed it was due to a recent knitr release, but after downgrading to1.4.0
im still seeing the issue. The issue arises during this call, and can be seen when printing any model_summary object. I haven't fully ruled out the idea that my environment could be part of the problem, so I would appreciate someone else verifying they also run into this issue (after updating all packages viapkgr install
).cc @kyleam @seth127