ropensci / skimr

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

Feature request - unique values #659

Closed issactoast closed 3 years ago

issactoast commented 3 years ago

First of all, thank you for making this awesome useful package!

I use this almost every my data analysis nowadays! One thing that I want to have in the skim() function is to show the number of unique values for each variables. Can we have that in the future?

michaelquinn32 commented 3 years ago

Thanks Issac!

We probably won't change the default summary functions for skimr any time soon, but one of the package's strengths is customization. For factors and character variables, we show a count of the highest frequency values: https://github.com/ropensci/skimr/blob/840b6237597e3da7c8970a6581086ef73c561678/R/stats.R#L65-L78

There a lot of examples for package customization in the README, vignettes and documentation for skim_with(). https://github.com/ropensci/skimr/blob/840b6237597e3da7c8970a6581086ef73c561678/R/skim_with.R#L40

Let us know if we can give more pointers.

Best wishes, Michael

issactoast commented 3 years ago

Thank you! will take a look at it!