-
Notifications
You must be signed in to change notification settings - Fork 79
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
loading kableExtra seems to break the skim html output #637
Comments
Hi Arthur! I'm wording if if we somehow have a namespace clash. Can you please install the reprex package and call the following:
Otherwise, could you let me know what else you mean by doesn't print correctly"? Is it a unicode character issue or something else? Thanks! |
Yes I definitely see some formatting issues in html, PDF and Word. |
kableExtra does have its own exported |
Here's my reprex output. Doesn't seem to throw any errors. I don't get any warnings, even about function conflicts. library(skimr)
library(knitr)
library(kableExtra) Created on 2021-02-22 by the reprex package (v1.0.0) |
No problem. Seems to be a combination of unicode issue and formatting. Unicode issues for the histograms, where I see output like "U+2586". Formatting issues where the fonts seem too large and the column titles overlap and the column entries don't line up nicely. |
You are on Windows, and we explain in the documentation that R on Windows at this point does not support unicode. |
I really feel this is a problem of kableExtra, but still we may need to fix. It also impacts printing on the console. I checked our code and any time we use the knitr() function we namespace it, but it's probably that there is another namespace issue buried inside knitr. Is there a way we can explicitly unload kableExtra? |
So the explanation is the kableExtra changes the default to html. We could possibly try to change the default back but I guess the question is why use kableExtra when using skimr? |
Any time a person wants to display html tables and data frame summary statistics in the same markdown document, they might use the two packages. They have different purposes. |
Right now, I think until kableExtra comes up with a less intrusive way of doing things, you would need to change the default before and after skimming. I have no idea if that will actually work. I'm really surprised that CRAN allowed this. |
@haozhu233 Were you ever able to address this issue in kableExtra? |
@elinw Sure, sorry for the delay. There is an option in kableExtra that controls this behavior.
If you turn the |
Is it possible to put a note about this in the skimr vignette? I'm new to skimr and just spent a couple hours trying to fix this before coming across this solution in the post. Might save others some time in the future. |
Really sorry for the inconvenience! I'd be happy to accept a PR to add this. If you're interested, please check out the contributing guide. Thanks! |
First of all, thanks for the great package!
I haven't been able to use skimr and kableExtra in the same Markdown document. If I have a library(kableExtra) statement, the skim table doesn't print correctly in the knit document.
I was able to create these two simple documents to illustrate the problem. I'm on Windows 10 and using skimr 2.1.2.
This one has the issue
---
title: "skim test"
output: html_document
---
This one works
---
title: "skim test"
output: html_document
---
The text was updated successfully, but these errors were encountered: