calculateRFM: calculateRFM

Description Usage Arguments Details Value

Description

Calculate a weighted RFM score: recency, frequency, monetary value

Usage

1
2
calculateRFM(data, weight_recency = 1, weight_frequency = 1,
  weight_monetary = 1)

Arguments

data

- a data.table containing the transaction records

r

- weight of recency

f

- weight of frequency

m

- weight of monetary value

Details

data contains the transactional data. The dataset must contain a column labeled "Customer" that allows unique customer identification and a column labeled "TransDate", indicating the purchase date. The column "PurchAmount" specifies the total spending per purchase.

Value

returns a data.table containing the recency, frequency and monetary score as well as well as the weighted final score and the group membership.


AnnaGotz/testRepoForPackage documentation built on May 28, 2019, 2:29 p.m.