Mutate by group with less boilerplate

mutate_by(df, group_var, ...)

Arguments

df

data frame

group_var

bare/unquoted column name to group by

...

expressions as you would normally use in mutate

Value

ungrouped data frame containing results of grouped summary