Description Usage Arguments Value
rfm
returns an RFM object from a customer order tbl or data frame.
1 |
orders_df |
An orders table with one row per order and columns corresponding to the next three arguments. |
cust_id |
A string with the column name with a unique identifier for the customer (typically integer or character). |
order_date |
A string with the column name of the date of the order (Date). |
order_value |
A string with the column name of the value of the order (numeric). |
as_of_date |
An optional Date giving the orders_df "as-of-date". If omitted, last order_date will be used. |
A tbl with the columns for each customer:
Actual column name taken from "cust_id"
Last order date (Date)
First order date (Date)
Number of orders (integer)
Total value of orders (numeric)
Number of days between last order and as-of-date (integer)
Number of days between first order and as-of-date (integer)
Note that the tbl is ungrouped.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.