[R] loop

mhalsham mhalsham at bradford.ac.uk
Tue Jun 1 11:12:11 CEST 2010


Can any one help it will be very kind, loop statements
I have this table and some more records, I want to reshape it

V1 V2 V3 V4 V5 V6 V7 V8 V9 V10
TP53 Dis1 Dis2 Dis3 Dis4 Dis5 Dis6
DCI New1 New2 New3 New4
FDI Hi2 H3 H4
GHD I1 I3 I4 I5 I6 I7 I8

I want my new table or matrix to be some thing like this

V1 V2 V3
Tp53 Dis1 Dis2
Tp53 Dis1 Dis3
Tp53 Dis1 Dis4
Tp53 Dis1 Dis5
Tp53 Dis1 Dis6
Tp53 Dis2 Dis3
Tp53 Dis2 Dis4
Tp53 Dis2 Dis5
Tp53 Dis2 Dis6
Tp53 Dis3 Dis4
Tp53 Dis3 Dis5
Tp53 Dis3 Dis6
Tp53 Dis4 Dis5
Tp53 Dis4 Dis6
Tp53 Dis5 Dis6
DCI New1 New2
DCI New1 New3
DCI New1 New4
DCI New2 New3
DCI New2 New4
DCI New3 New4
               

And so on for the rest of the table. 
-- 
View this message in context: http://r.789695.n4.nabble.com/loop-tp2238209p2238209.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list