Create a summary of cumulative repeat transactions by cohort
using the event-log.
Create a plot of the summary of the cumulative repeat transactions by cohort
using the event-log.
Arguments
- elog
Event log, a data.frame with field
custfor the customer ID and fielddatefor the date/time of the event, which should be of type Date or POSIXt. Ifsalesorreturnsfield is present, it will be aggregated. Seedetailsfor more information.- elog_repeat_purchase_data
Data created with
elog_repeat_purchase().- ...
Further arguments to
ggplot2::geom_smooth().
Examples
elog_repeat_purchase(elog_validated$elog)
#> # A tibble: 1,298 × 6
#> first_year days_since_first_purchase n cumulative_sum sum
#> <fct> <dbl> <int> <int> <int>
#> 1 2017 1 10 10 1278
#> 2 2017 2 11 21 1278
#> 3 2017 3 10 31 1278
#> 4 2017 4 4 35 1278
#> 5 2017 5 9 44 1278
#> 6 2017 6 4 48 1278
#> 7 2017 7 8 56 1278
#> 8 2017 8 8 64 1278
#> 9 2017 9 3 67 1278
#> 10 2017 10 5 72 1278
#> # ℹ 1,288 more rows
#> # ℹ 1 more variable: cumulative_percent <dbl>
elog_repeat_purchase_data <- elog_repeat_purchase(elog_validated$elog)
p <- elog_repeat_purchase_plot(elog_repeat_purchase_data)