Skip to content
Prev 199689 / 398502 Next

Complicated For Loop (to me)

Since you did not follow the posting and provide data, here is a way
that you can split by race & region and perform operations on each
subset of the data frame:
+                 region=sample(1:9, n, TRUE), values=runif(n))
a.1       b.1       c.1       a.2       b.2       c.2       a.3
     b.3       c.3       a.4
0.4832214 0.4792623 0.4846138 0.5098792 0.4997666 0.5212905 0.5068535
0.5140438 0.5580490 0.4849455
      b.4       c.4       a.5       b.5       c.5       a.6       b.6
     c.6       a.7       b.7
0.4952947 0.4639553 0.4798192 0.5030650 0.4889465 0.4839610 0.5080325
0.5176548 0.4788206 0.5300395
      c.7       a.8       b.8       c.8       a.9       b.9       c.9
0.4799252 0.4871341 0.4675535 0.4899783 0.5172642 0.4968789 0.5499326

        
On Mon, Nov 9, 2009 at 3:18 PM, agm. <amurray at vt.edu> wrote: