ropensci / skimr

A frictionless, pipeable approach to dealing with summary statistics
https://docs.ropensci.org/skimr
1.1k stars 78 forks source link

Deal with bookdown better #473

Open elinw opened 4 years ago

elinw commented 4 years ago

We have a few issues related to rendering in bookdown. It's just a special case of rendering, but it's an important one, so I'd like to centralize here.

453 #424 ... what else?

elinw commented 4 years ago

What about if we made a compact print that didn't include the lines?

Are we assuming the if someone is in bookdown they will organize the width themselves by selecting which statistics and potentially skimming twice to break it into outputs that fit on a page?

elinw commented 4 years ago

https://github.com/ropensci/skimr/pull/561

srwerth commented 2 years ago

I'm having trouble with skimr and bookdown as well. When I knit a document with the skim_without_charts() function, the table is too wide for the page and has no horizontal scrollbar. The screenshot below shows where the chart is getting cut off. I removed one of the table variables (complete_rate) to try to make it fit on the screen, but I don't want to lose any of the others. Screen Shot 2022-01-02 at 4 18 53 PM

elinw commented 2 years ago

Yes, and this relates to the issue of data with many columns. #370 I think we need to look closely at the print methods and see if we can add an option to allow nice splitting up into subtables beyond a set number of columns. I think the Pander package does this. I'm looking at thos means and sds also and wondering why they are rendering with so many columns, but that is probably a function of your data. @michaelquinn32 what do you think?

michaelquinn32 commented 2 years ago

kableExtra can support horizontal scrolling. https://stackoverflow.com/questions/45849433/horizontal-scrolling-in-rmarkdown/45886734

This should be pretty easy to support after #667. We will modify the markdown rendering function, which is what is happening here, to include a horizontal scroll. Or the user can do it.