Closed dineshj3d closed 4 years ago
First you have to create your function bottom_counts(). Then you would add it to the sfl for factor. You could take a look at the function code for top_counts() and modify it to get the lowest.
Thank you. - will create a new function modeled on top_counts. Not sure how to call the function via sfl (have reviewed the documentation). Appreciate any pointers. Thanks again. top_counts <- function(x, max_char = 3, max_levels = 4) { counts <- sorted_count(x) if (length(counts) > max_levels) { top <- counts[seq_len(max_levels)] } else { top <- counts } top_names <- substr(names(top), 1, max_char) paste0(top_names, ": ", top, collapse = ", ") }
my_skim <- skim_with(factor = sfl(bottom_counts = bottom_counts))
From the example in the Using Skimmer vignette.
This issue is not really an issue report. The best places to get help are probably StackOverflow and Twitter (#rstats)
Understood. Thanks for the recommendation. Appreciate the help.
For my data management work, having a peak at the bottom counts would be just as useful as top counts. Looking for guidance how to accomplish via sfl function. Any help appreciated.