dc.GetFirstPurchasePeriodsFromCBT: Get First Purchase Periods from Customer-by-Time Matrix

Description Usage Arguments Value

View source: R/dc.R

Description

Uses a customer-by-time matrix to return a vector containing the periods in which customers made their first purchase.

Usage

1

Arguments

cbt

customer-by-time matrix. This is a matrix consisting of a row per customer and a column per time period. It should contain numeric information about a customer's transactions in every time period - either the number of transactions in that time period (frequency), a 1 to indicate that at least 1 transaction occurred (reach), or the average/total amount spent in that time period.

Value

a vector containing the indices of periods in which customers made their first transactions. To convert to actual dates (if your customer-by-time matrix has dates as column names), use colnames(cbt)[RESULT]


BTYD documentation built on Nov. 18, 2021, 1:10 a.m.