Skip to content
Prev 285548 / 398502 Next

how to rbind matrices from different loops

Is this close to what you want:
+ ( abs(round(rnorm(50,mean=500,sd=250),digits=0)))
+ ,3), group=rep(1:15,10))
+     , lapply(split(example, example$group), function(.grp){
+         data.frame(group = .grp$group[1L]
+                 , unique = paste(unique(.grp$id), collapse = ',')
+                 )
+         })
+ )
group                                   unique
1      1  175,186,226,318,458,609,633,682,719,869
2      2 290,361,408,487,500,559,773,779,809,1459
3      3 201,283,371,470,479,513,576,719,810,1037
4      4   4,18,118,212,291,482,738,818,1008,1095
5      5 115,243,253,385,396,447,547,625,790,1156
6      6  175,186,226,318,458,609,633,682,719,869
7      7 290,361,408,487,500,559,773,779,809,1459
8      8 201,283,371,470,479,513,576,719,810,1037
9      9   4,18,118,212,291,482,738,818,1008,1095
10    10 115,243,253,385,396,447,547,625,790,1156
11    11  175,186,226,318,458,609,633,682,719,869
12    12 290,361,408,487,500,559,773,779,809,1459
13    13 201,283,371,470,479,513,576,719,810,1037
14    14   4,18,118,212,291,482,738,818,1008,1095
15    15 115,243,253,385,396,447,547,625,790,1156
On Thu, Feb 16, 2012 at 11:15 AM, Matt Spitzer
<matthewjspitzer at gmail.com> wrote: