ropensci / skimr

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

onboarding skim_with and being more functional #292

Closed elinw closed 6 years ago

elinw commented 6 years ago

The issue of changing the basic way that skim_with() works to make it more functional style (and specifically allow users to set up interchangeable sets of skimmers is a good one. This is already discussed in https://github.com/ropenscilabs/skimr/issues/235 and we made it a milestone for 2.0 because it is going to require substantial rethinking. The entire structure of skimming has really changed (gotten much more complex) especially since we have added support for the tidy select helpers. Given that we have already gone beyond skim(x) the question is whether we have something like with=. That said I almost feel like we need the equivalent of tidy selectors.

I feel like if I were using skimr a lot I might want to store an object (maybe a list? or data frame with a list column and row names?) of the skimmers that I use repeatedly so that I could just call them up by name. Would it be smart to document something like that?

elinw commented 6 years ago

I'm going to say that this is complex because of NSE in the lists.

elinw commented 6 years ago

So actually I played with this today. I'm sure it's not ideal and could even be done more cleanly with rlang constructs but https://gist.github.com/elinw/753bac0eefb951a8a235cc2578f15fd1 shows how someone could make a list of skimmers and then assign specific elements of the list in a function. It might be worth at least documenting this possibility and then using that as an API to build. Or we could even include such a function. and then eventually refactor. @michaelquinn32 @jimhester, @rgayler

elinw commented 6 years ago

https://github.com/ropenscilabs/skimr/pull/320 I'm leaving this open because the onboarding reviewers need to be able to find it and it also relates to #320 .