-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve table printing #4
Comments
I digged a bit into the code, and this one is tricky... we need to use |
Yes, I tried with some regex detection (if the stripped characters began with the "-" string), without success... We might need to imagine another way of integrating the colouring, the formatting and the to-string conversion than my clunky proposal |
Moreover, the format has to be used on the striped columns (without the colour codes), otherwise, the columns are too large (as the colour codes disappear)... So yea very tricky, puzzling and challenging haha... and worth trouble (even now with the uneven columns, I find the colouring of the coefs and such super cool 😄) |
Ok, I think we can reduce code complexity and should put the formatting in |
This can be relevant for future vignette / readme improvements: https://twitter.com/BrodieGaslam/status/1029059002225721344 |
I would say that column with numers should be right-aligned, while "string" columns (with values that are non-numeric from the user's perspective) should be left-aligned... Isn't this a common table convention? |
Table printing no longer works for model-objects when digits are specified. Thus, we need some extra handling here. I tried to solve this using an additional class attribute. We should think about how to solve this issue, respectively if my suggestion is ok and not too sloppy. |
It seems that bold slightly enlarges the column, resulting in a minor misalignment toward the end... but that's details ^^ |
Damn... ;-) |
Can you check if my workaround works for you? I don't have this alignment issue. |
Yes, I'm using RStudio (both latest stable and current preview) on Windows 10 (light theme). Strange, but then let's format p-values in colour, not bold. |
Strange indeed... maybe has something to do with the font used? |
Table printing is a bit jiggly, i.e., the columns are not perfectly aligned (due to coloured columns). This must be improved, but I am not sure how...
The answer is probably within the
.display.data.frame
function indisplay.R
, where the alignment is done.The text was updated successfully, but these errors were encountered: