I have a transaction dataset like this: transaction data
I used "arules" package to transform it to transaction data.
transactions <- read.csv("transactions.csv",header=TRUE,sep=",")
agg <- split(transactions$item,transactions$TransID)
ready <- as(agg,"transactions")
Now I need a csv file on my desktop which is a binary matrix form: Transactions in the rows and items in the columns: 0 and 1 values in the matrix like this: binary matrix format
I used write function in the "arules" package but could not have it.
table
work? - user20650