Description Usage Arguments Value Author(s) Examples
This function helps users to convert data frame to transaction data quickly
1 | transaction.convert(data, type = c("wide", "long"))
|
Data |
set - This functions supports 2 kinds of data wide & long |
Type |
- Two option: "wide" and "long" |
Return a transaction data
Anh Hoang Duc (anhhd3@vpbank.com.vn)
1 2 3 4 | df1 <- data.frame(Transaction_ID = c(1,2,1,3,1,2), Products = c(2,3,2,4,4,5))
transaction.convert(df1, type = "long")
df2 <- data.frame(ID = c(1,2,3), Product_1 = c(1,1,0), Product_2 = c(0,1,1), Product_3 = c(0,0,1))
transaction.convert(df2, type = "wide")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.