-
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
Using skimr with purr:map does not generate html format #671
Comments
This is what I got in a regular markdown file. |
In your above example, the output of Referring to this link - https://rpubs.com/dav43/adfg - you can see that Just wanting to clarify if this is a bug or not. If not, I assumed that |
So the issue is (I think) that knit_print is not kicking in because the print method for list calls the regular print. I could potentially see a few possible ways to make it work. |
So something like this
Starts to get at the issue, but the formatting isn't right on the subtables.. It's not an issue with purrr or map specifically, it is anything with having a list of skim_df objects. These have to go into a somewhat complicated process if you want to do anything besides individually naming the elements of the list. I guess what happens is that the dispatch for printing lists is already a big complex and the knit_print adds to that. |
@michaelquinn32 Any thoughts on this? |
We don't have a
My version of Rstudio (actually Rstudio server running on WSL), does something weird with the summaries, so I turned that off. Otherwise, the results look about right to me. |
So the key is getting it to use knit_print directly ... I think we should
certainly document this somewhere. But the question for me is whether we
create a function that aliases that.
…On Fri, Dec 17, 2021 at 10:40 PM Michael Quinn ***@***.***> wrote:
We don't have a knit_print method for a list of skim_df objects. You can
hack something together:
library(skimr)
library(purrr)
library(knitr)
a <- 1:3
b <- letters[4:6]
list(a, b) %>%
purrr::map(skim) %>%
purrr::map_chr(knitr::knit_print, options = list(skimr_include_summary = FALSE)) %>%
knitr::asis_output()
My version of Rstudio (actually Rstudio server running on WSL), does
something weird with the summaries, so I turned that off. Otherwise, the
results look about right to me.
—
Reply to this email directly, view it on GitHub
<#671 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFYI7PTQYGOMGZUZH5MHO3URP7D3ANCNFSM5GLCVOTA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Here's an rpubs rendering with @michaelquinn32 's code I'm really sure that including summary would be problematic because of how the code is structured. If anything I would separately run just the summaries and then if you really wanted you could potentially merge them back together. Also we do have knit_print.skim_df but it's not exported. |
I think we should consider dealing with making summary more functional should be one of the goals for 2.2. I would actually like to export the print for skim_df since I think it gives some more flexibility to users to customize reports. One of the big issues is still dealing with the lines that are too wide for the paper/slides when people knit. Wow this was 12 months ago. |
Using the package to print summary information across a list (of tibbles usually), I can't get the package to ouput to html in an R Notebook - using the Knit command.
Example below.
Not sure if this is a bug or I'm just using skimr incorrectly with the map.
The text was updated successfully, but these errors were encountered: