Aggregates an event log to either incremental or cumulative number of
transactions. If first=TRUE then the initial transactions of each
customer are included in the count as well.
Usage
elog2cum(elog, by = 7, first = FALSE)
elog2inc(elog, by = 7, first = FALSE)
Arguments
elog
Event log, a data.frame with columns cust and
transaction time t or date.
by
Only return every by-th count Defaults to 7, and thus
returns weekly numbers.
first
If TRUE, then the first transaction for each customer is being
counted as well
Value
Numeric vector of transaction counts.
Details
Duplicate transactions with identical cust and date (or
t) field are counted only once.