Description Usage Arguments Details Examples
Build a customers dataset from a transactions dataset with required columns CustomerID, TransactionDate (or alternate names)
1 2 3 | get_customers(transactions, colCustomerID = "CustomerID",
colTransactionDate = "TransactionDate", colsFinancial = NULL,
colsCategory = NULL)
|
transactions |
A data.table of transactions with a column for CustomerID and TransactionDate |
colCustomerID |
Name of the CustomerID column |
colTransactionDate |
Name of the TransactionDate column |
colsFinancial |
Character vector corresponding to the name of financial columns in |
colsCategory |
Character vector corresponding to the name of categorical columns in |
Returns a data.table object with one row per unique CustomerID
1 2 3 4 5 6 | library(data.table)
set.seed(2016)
transactions <- sample_transactions(10)
get_customers(transactions)
get_customers(transactions, colsFinancial=c("Amount"), colsCategory=c("Product"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.