Learn R Programming

naniar (version 0.6.1)

group_by_fun: Group By Helper

Description

This is a wrapper to facilitate the grouped_df S3 method.

Usage

group_by_fun(data, .fun, ...)

Value

a dataframe with the function applied to each group

Arguments

data

data.frame, which will be grouped

.fun

a function to apply

...

additional arguments to be passed to map

Examples

Run this code

if (FALSE) {
miss_case_table.grouped_df <- function(data){
group_by_fun(data,.fun = miss_case_table)
}
airquality %>%
group_by(Month) %>%
miss_case_table()
}

Run the code above in your browser using DataLab