[R] How do I construct a one matrix from another? (newbie)

jonathanbriggs jonathanbriggs at mac.com
Sun Jun 7 19:26:21 CEST 2009


Apologies if this is an obvious question but I am teaching myself R and the
occasional push in the right direction is much appreciated?

I have a data.frame containing data that looks like this

CustID itemID
1        a
1        b
2        c
3        a
3        c

I want to assemble the vector of all the items bought by a particular
customer and can't quite see how to do it.

What is the best way to represent the answers for a single customer and by
all customers?

Thanks.
-- 
View this message in context: http://www.nabble.com/How-do-I-construct-a-one-matrix-from-another--%28newbie%29-tp23913248p23913248.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list