Hi All

Hoping someone can help me with the "transactions" object. I am struggling
to get my data in. I know the answer is in the help somewhere I'm sure, I
just cannot find it. Essentially, I have data in this format (though I can
change it if it particularly unsuitable)

Transaction_id, store     , salesman, date_time          , items

1             , waterfront, john    , 2008-01-01 12:00:00, hardware games
audio_visual photo

2             , sandton   , lisa    , 2008-01-02 12:00:00, photo

3             , waterfront, peter   , 2008-01-01 12:00:00, hardware photo

 

How do I get this into a transactions data type? I wish to get all the
apriori() stats for each salesman, and see who's good at selling add-ons and
up-selling (and how salespeople react when certain items are discounted).
For this analysis, I need to filter on salesman and date_time. 

 

I realise that the EPubs dataset in the arules package has a few extra
fields apart from the transaction_ids and the actual items, but I can't
figure out how to get the additional fields (in my case store, salesman,
date_time) in.

 

(PS: it would not be too hard for me to binary-ise the items fields if this
would help.)


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to