Re: [R] question about transpose

2010-01-30 Thread Joshua Wiley
Hello, Here are three examples.  I have a hunch you are looking for the last one. > test <- matrix(LETTERS[1:6], nrow=2, dimnames=list(c("First", "Second"))) > #explicitly stating what the rownames are before transposing > test    [,1] [,2] [,3] First  "A"  "C"  "E" Second "B"  "D"  "F" > t

Re: [R] question about transpose

2010-01-29 Thread David Winsemius
On Jan 29, 2010, at 6:58 PM, Zoppoli, Gabriele (NIH/NCI) [G] wrote: Hi all, if I transpose a matrix with t(data), the newly created colums do not appear to have the first row as header. How can I do to have all the newly created columns have their first row as a header? The term "header"

[R] question about transpose

2010-01-29 Thread Zoppoli, Gabriele (NIH/NCI) [G]
Hi all, if I transpose a matrix with t(data), the newly created colums do not appear to have the first row as header. How can I do to have all the newly created columns have their first row as a header? Thanks Gabriele Zoppoli, MD Ph.D. Fellow, Experimental and Clinical Oncology and Hematolog