[R] How do I construct a one matrix from another? (newbie)
Dylan Beaudette
dylan.beaudette at gmail.com
Sun Jun 7 20:37:40 CEST 2009
Hi,
some ideas:
?split
?by
library(plyr)
?ddply
Cheers,
Dylan
On Sun, Jun 7, 2009 at 10:26 AM, jonathanbriggs<jonathanbriggs at mac.com> wrote:
>
> 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.
>
> ______________________________________________
> R-help at 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.
>
More information about the R-help
mailing list