I have data in matrix form, where there are several rows that should ideally be independent columns. For example, I have something like this:
id2 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | |||
name2 | AA | BB | CC | DD | EE | FF | GG | HH | |||
location2 | G1 | G2 | G3 | G4 | G5 | G6 | G7 | G8 | |||
id1 | name1 | location1 | |||||||||
1 | A | l1 | a1 | a2 | a3 | a4 | a5 | a6 | a7 | a8 | a9 |
2 | B | l2 | b1 | b2 | b3 | b4 | b5 | b6 | b7 | b8 | b9 |
3 | C | l3 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 |
4 | D | l4 | d1 | d2 | d3 | d4 | d5 | d6 | d7 | d8 | d9 |
5 | E | l5 | e1 | e2 | e3 | e4 | e5 | e6 | e7 | e8 | e9 |
6 | F | l6 | f1 | f2 | f3 | f4 | f5 | f6 | f7 | f8 | f9 |
7 | G | l7 | g1 | g2 | g3 | g4 | g5 | g6 | g7 | g8 | g9 |
8 | H | l8 | h1 | h2 | h3 | h4 | h5 | h6 | h7 | h8 | h9 |
9 | I | l9 | i1 | i2 | i3 | i4 | i5 | i6 | i7 | i8 | i9 |
10 | J | l10 | j1 | j2 | j3 | j4 | j5 | j6 | j7 | j8 | j9 |
11 | K | l11 | k1 | k2 | k3 | k4 | k5 | k6 | k7 | k8 | k9 |
12 | L | l12 | l1 | l2 | l3 | l4 | l5 | l6 | l7 | l8 | l9 |
13 | M | l13 | m1 | m2 | m3 | m4 | m5 | m6 | m7 | m8 | m9 |
Thanks
0 Response to Convert Data in Matrix Form to Long Format
Post a Comment