I'm a beginner when it comes to R. But, I want to learn more. I'm trying to do a market bench analysis.
This is my raw data and I want to convert this to a transactions basket format:
This is what I am trying to achieve:
I have tried :
trans <- as(split(a[,"Game.played"],a[,"sessionid"]),"transactions")
But, instead of the name of the game, the number of the game is only displayed. Could anyone tell me why this is happening? Also, I have cross verifies the actual data, and the association of the sessionid with the game is wrong!
I have also tried something like
q=read.transactions("a.csv", format = "basket", sep=",", rm.duplicates=TRUE).
But, this is not working out either.
Here's an example on how you could remove the duplicates: