ropensci / skimr

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

Consider adding a default skimmer for large integers #744

Closed cornejom closed 3 months ago

cornejom commented 3 months ago

Attempting to skim on dataframe columns of type "integer64" results in warning and fallback to skimming as "character".

Please consider adding this into the default set of skimmers.

michaelquinn32 commented 3 months ago

Thanks for the comment!

Unfortunately, there isn't a straightforward way for us to support this, because integer64 isn't a native R datatype and operations on them is full of challenging assumptions. From: https://cran.r-project.org/web/packages/bit64/bit64.pdf

image

For that reason, it is better to handle the int64 manually for the type of analysis you're trying to do. Is it actually an integer or a categorical variable, etc? Similarly, if you want to create a custom skimr for the class, there are good guides for this:

https://docs.ropensci.org/skimr/articles/extending_skimr.html#defining-sfls-for-a-package