Skip to content
Prev 176100 / 398503 Next

data.frame, converting row data to columns

Does this do what you want:
+ 1                    4094          3.34                    1   frustrated
+ 2                    4094          3.94                    1  frustrated
+ 3                    4094            NA                    1   frustrated
+ 4                    4094          3.51                    1   frustrated
+ 5                    4094          3.81                    1   frustrated
+ 6                    4101          2.62                    4   excited
+ 7                    4094          2.65                    1   frustrated
+ 8                    4101            NA                    4   excited
+ 9                    4101          0.24                    4   excited
+ 10                   4101          0.23                    4
excited"), header=TRUE)
name nLevel       emot    1    2    3    4    5    6
1 4094      1 frustrated 3.34 3.94   NA 3.51 3.81 2.65
2 4101      4    excited 2.62   NA 0.24 0.23   NA   NA
On Sat, Apr 4, 2009 at 1:09 PM, ds <dhshanab at acad.umass.edu> wrote: