An overview of customer segments.

rfm_segment_summary(segments)

Arguments

segments

Output from rfm_segment.

Examples

analysis_date <- as.Date('2006-12-31')
rfm_result <- rfm_table_order(rfm_data_orders, customer_id, order_date,
revenue, analysis_date)

segment_names <- c("Champions", "Loyal Customers", "Potential Loyalist",
  "New Customers", "Promising", "Need Attention", "About To Sleep",
  "At Risk", "Can't Lose Them", "Lost")

recency_lower <- c(4, 2, 3, 4, 3, 2, 2, 1, 1, 1)
recency_upper <- c(5, 5, 5, 5, 4, 3, 3, 2, 1, 2)
frequency_lower <- c(4, 3, 1, 1, 1, 2, 1, 2, 4, 1)
frequency_upper <- c(5, 5, 3, 1, 1, 3, 2, 5, 5, 2)
monetary_lower <- c(4, 3, 1, 1, 1, 2, 1, 2, 4, 1)
monetary_upper <- c(5, 5, 3, 1, 1, 3, 2, 5, 5, 2)

segments <- rfm_segment(rfm_result, segment_names, recency_lower,
recency_upper, frequency_lower, frequency_upper, monetary_lower,
monetary_upper)

rfm_segment_summary(segments)
#>              segment customers orders revenue       aov
#> 1    Loyal Customers       278   1708  166712  97.60656
#> 2            At Risk        86    438   44178 100.86301
#> 3          Champions       158   1234  120178  97.38898
#> 4     Need Attention        35    144   13287  92.27083
#> 5               Lost       111    244   20955  85.88115
#> 6 Potential Loyalist       229    801   65873  82.23845
#> 7     About To Sleep        50    127   10914  85.93701
#> 8             Others        48    210   22061 105.05238