Learn R Programming

rfm (version 0.2.2)

rfm_heatmap_data: Heatmap data

Description

Data for generating heatmap.

Usage

rfm_heatmap_data(rfm_table)

Arguments

rfm_table

An object of class rfm_table.

Examples

Run this code
# using transaction data
analysis_date <- lubridate::as_date('2006-12-31')
rfm_order <- rfm_table_order(rfm_data_orders, customer_id, order_date,
revenue, analysis_date)

# heat map data
rfm_heatmap_data(rfm_order)

# using customer data
analysis_date <- lubridate::as_date('2007-01-01')
rfm_customer <- rfm_table_customer(rfm_data_customer, customer_id,
number_of_orders, recency_days, revenue, analysis_date)

# heat map data
rfm_heatmap_data(rfm_customer)

Run the code above in your browser using DataLab