Shrink data.frame by group

shrink_df(
  df,
  by,
  string_func = jamba::cPasteU,
  num_func = mean,
  extra_funcs = NULL,
  do_test = FALSE,
  verbose = FALSE,
  ...
)

Details

This function condenses a data.frame by groups of rows, applying an appropriate function to character columns, and numeric columns. It is intended to be a simple but configurable tool for the majority of scenarios.

This function uses data.table for overall speed.