Message-ID: <20040227121443.GA3931@porcupine.gsf.de>
Date: 2004-02-27T12:14:43Z
From: Philipp Pagel
Subject: Change the result data
In-Reply-To: <403F29D4.6070407@cs.uu.nl>
Using stack() would be a possibility:
> a <- stack(as.data.frame(hec.data))
> a$eye=rownames(hec.data)
> a
values ind eye
1 5 Black Green
2 15 Black Hazel
3 20 Black Blue
4 68 Black Brown
5 29 Brown Green
6 54 Brown Hazel
7 84 Brown Blue
8 119 Brown Brown
9 14 Red Green
10 14 Red Hazel
11 17 Red Blue
12 26 Red Brown
13 16 Blond Green
14 10 Blond Hazel
15 94 Blond Blue
16 7 Blond Brown
Also have a look at reshape().
cu
Philipp
--
Dr. Philipp Pagel Tel. +49-89-3187-3675
Institute for Bioinformatics / MIPS Fax. +49-89-3187-3585
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1
85764 Neuherberg, Germany
http://mips.gsf.de/~pagel