Re: [R] transaction object - how to coerce this data

2010-09-01 Thread jim holtman
try this: > x.t <- split(x$item, x$basketID) > x.t $`1` [1] "bread" "cheese" "milk" $`2` [1] "bread" "cheese" "eggs" $`3` [1] "bread" "cheese" "beer" > dput(x.t) structure(list(`1` = c("bread", "cheese", "milk"), `2` = c("bread", "cheese", "eggs"), `3` = c("bread", "cheese", "beer")), .Names

[R] transaction object - how to coerce this data

2010-08-31 Thread pdb
Hi, I am wanting to look at frequent item sets using the arules package. I need to transform my data into a "transactions" object. The data I read in from a file has 2 columns, an ID and an item. How do I convert data like this into a transactions object? I've tried class? transactions but it o