cohort_summarise | R Documentation |
cohort_summarise() perform cohort analysis by summarizing variable. For example, sum() of revenue of each cohort.
cohort_summarise( data, .id_col, .time_col, .summarise_col, .fn = c("mean"), ..., time_unit = c("week", "month", "quarter", "year"), percent_form = TRUE, relative_time = TRUE, all_group = FALSE )
data |
Input data |
.id_col |
Variable to identify entities (maybe customer ID) |
.time_col |
Time correspond to id_col. Must be in date or date-time format |
.summarise_col |
Variable to perform summarise on |
.fn |
Function to perform summarise, in character form.default is " |
... |
Additional argument pass to |
time_unit |
Time unit to group to cohort |
percent_form |
Should return table contain percentage value or absolute value |
relative_time |
Should return column is relative time or absolute period |
all_group |
Should result include group of all entities. This argument must only set to TRUE when both percent_form and relative_time is TRUE |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.