bstfun icon indicating copy to clipboard operation
bstfun copied to clipboard

add_sparkline() for categorical variables?

Open DeFilippis opened this issue 3 years ago • 2 comments

I'm loving this package -- particularly the add_sparkline() function. I notice it only works with continuous variables by default, but I'm wondering if there's a way to extend it's functionality so that histograms are made out of all the variables in a data.frame. For factor variables, you'd assume the ordering of factor levels is meaningful. Is there a way to make sparkline work with factors?

DeFilippis avatar Feb 17 '22 21:02 DeFilippis

Thanks for the post @DeFilippis !

This seems like a reasonable request. Likely something I won't be adding however. If you're will to propose a solution and prepare an pull request, I am open to reviewing.

ddsjoberg avatar Feb 17 '22 21:02 ddsjoberg

I think you may be best served using tbl_strata with add_sparkline, stacking the results

ddsjoberg avatar Feb 17 '22 21:02 ddsjoberg