Nothing
#' Count groups
#' @param data A data.frame
#' @param yvars variable names
#' @examples
#' library(moonBook)
#' countGroups(acs,"sex")
#' countGroups(acs,c("sex","Dx"))
#' @importFrom dplyr group_by_at n
#' @return An object of class "tibble"
#' @export
countGroups=function(data,yvars){
data %>%
group_by_at(yvars) %>%
summarise(n=n(),.groups="drop") %>%
mutate(n=paste0("(N=",.data$n,")")) -> df
df
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.