powered by
Easily summarize at all numeric variables. Helpful for flexibly summarizing without knowing the columns. Defaults to sum but you can send a custom function through also. Typically pass in a data frame after group_by.
sumnum(x, do.fun = NULL, except = c(), do.ungroup = TRUE, ...)
Summarized data frame or tibble.
Grouped tibble to summarize.
Function to use for the summary. Passed to dplyr::summarize(). Can be a custom function. Defaults to sum().
Columns names, numbers, or a logical vector indicating columns NOT to summarize.
Run dplyr::ungroup() after summarizing the prevent future issues with grouping.
Extra args passed to dplyr::summarize() which are applied as arguments to the function passed in do.fun.
require(dplyr) require(easyr) sumnum( group_by( cars, speed ) ) sumnum( group_by( cars, speed ), mean ) sumnum( cars )
Run the code above in your browser using DataLab