compute_summary: Summarize a data.frame

Description Usage Arguments Details Value

Description

Summarize a grouped data.frame by a specified column.

Usage

1
2
3
4
5
compute_summary_at(data = NULL, col_val = "cnt", cols_group, ...,
  tidy = FALSE, colname_stat = "stat")

compute_summary(data = NULL, col_val = "cnt", cols_group, ...,
  tidy = FALSE, colname_stat = "stat")

Arguments

data

data.frame.

col_val

character. Name of column whose values to keep for ranking.

cols_group

character(s). Names of columns to group by.

...

dots. Passed on to each of the functions used in the summary (e.g. na.rm).

tidy

logical. Indicates whether to convert to "tidy" format (like stargazer::stargazer()).

colname_stat

character. Name for stat column in "tidy" returned data.frame.

Details

Standard evaluation. data.frame should be "grouped" already. Note that 'n()' from dplyr is not used.

Value

data.frame.


aelhabr/teutils documentation built on May 7, 2019, 7:59 a.m.