[R] read.xls -> rotate data.frame

Knut Krueger rh at knut-krueger.de
Fri Mar 25 11:43:31 CET 2011


Hi to all,
how could I  to rotate automatically a data sheet which was imported by 
read.xls?

      x1 x2 x3 .... xn
y1 1   4  7   ...  xn/y1
y2 2   5  8   .... xn/y2
y3 3   6  9    ....xn/y2
yn ... ... ...         Xn/Yn


to

       y1 y2  y3   ....  yn
x1  1  2    3     ..... Yn/x1
x2  4  5    6     ....  Yn/x2
x3  7  8   9      ....  Yn/x2
xn  ...   ...  ...   .....  Yn/xn


Kind regards Knut



More information about the R-help mailing list