Learn R Programming

BTYD (version 2.4.3)

dc.SplitUpElogForRepeatTrans: Split Up Event Log for Repeat Transactions

Description

Turns an event log into a repeat transaction event log, removing customers' first transactions. Also returns a data frame with information about customers' first and last transactions.

Usage

dc.SplitUpElogForRepeatTrans(elog)

Arguments

elog

event log, which is a data frame with columns for customer ID ("cust"), date ("date"), and optionally other columns such as "sales". Each row represents an event, such as a transaction. The "date" column must contain date objects, not character strings or factors.

Value

A named list: - repeat.trans.elog an event log containing only repeat transactions - cust.data data frame containing the first and last transaction information for each customer