[R] Odp: Question about collapse/aggregate and avoidance of loops

2009-01-28 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 29.01.2009 07:52:37: > Dear all, > > given the following data > > ## original data > id <- c(1,1,1,2,2,3) > author <- c("A","B","C","D","E","F") > tmp <- data.frame(id,author) > tmp > > > > tmp >id author > 1 1 A > 2 1 B > 3 1

Re: [R] Odp: Question about collapse/aggregate and avoidance of loops

2009-01-29 Thread Bernd Weiss
markle...@verizon.net schrieb: Thanks Petr because I sent Bernd a solution offline but yours is MUCH NICER. it's not worth showing you because it was pretty ugly. Dear Mark & Petr, Thank your very much! I like both solutions. Petr's is the more obvious one but Mark's solution is good for