R/count_a_group.R

Defines functions count_a_group

Documented in count_a_group

#' @title Create a function that provides the top n number of a grouped
#' variable by counts
#' @param data_name Name of data that need to be group
#' @param groupings Groups
#' @import dplyr

count_a_group <- function(data_name, groupings){
  group_by_at(data_name, vars(one_of(groupings)))%>%
    summarise(count = n())
}
jenniferzj/DSTools documentation built on May 25, 2019, 6:23 p.m.