[R] CoDA DataFrame: Change Column to Row Name

Rich Shepard rshepard at appl-ecosys.com
Fri Jun 20 00:07:58 CEST 2014


   I recall reading how to do this somewhere, but I cannot find just where I
read it. I have compositional data frames of this format:

     sampdate filter gather  graze predate  shred
1 2000-07-18 0.0550 0.5596 0.0734  0.2294 0.0826
2 2003-07-08 0.0734 0.6147 0.0183  0.2294 0.0642
3 2005-07-13 0.1161 0.5714 0.0357  0.1696 0.1071
4 2006-06-28 0.1000 0.4667 0.1500  0.1333 0.1500
5 2010-09-14 0.0778 0.6111 0.0444  0.1889 0.0778
6 2011-07-13 0.0879 0.5714 0.0659  0.2747 0.0000
7 2012-07-11 0.1042 0.5313 0.0625  0.2396 0.0625

and the sampdate column should be the row headings rather than the numeric
sequence seen above. What is the command to move the sampdates to row
headers?

Rich



More information about the R-help mailing list