#' Returns a list of count tables for all variables in a dataframe
#'
#' Returns a list of count tables for all variables in a dataframe. This is useful in EDA for getting an overview of character and factor variables
#' @param data is the data
#' @keywords EDA count
#' @import dplyr
#' @export
#' @examples
#' nycflights13:flights %>% select_if(is.factor) %>% count_all()
count_all <- function(data){
assertthat::assert_that(is.data.frame(data))
data %>% purrr::map(~dplyr::count(data.frame(x = .x), x))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.