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

From: Knut Krueger <rh_at_knut-krueger.de>
Date: Fri, 25 Mar 2011 11:43:31 +0100


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



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 25 Mar 2011 - 10:48:21 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 Fri 25 Mar 2011 - 17:20: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