[R] loop

From: mhalsham <mhalsham_at_bradford.ac.uk>
Date: Tue, 01 Jun 2010 02:12:11 -0700 (PDT)

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.

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 01 Jun 2010 - 13:50:18 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 02 Jun 2010 - 00:50:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive