Dear Joe,
t() works on data frames, so all you need do is t(your.data.frame). Of
course, this likely only makes sense if all of the columns of
your.data.frame are numeric, and a numeric matrix will result. If you want
the transpose to be a data frame, then you can do
as.data.frame(t(your.data.frame)).
You can remove the column names from a data frame by names(my.data.frame)
<- NULL, but that seems to me generally ill-advised.
I hope this helps,
John
At 12:40 PM 2/18/2004 -0800, Joe Cerniglia wrote:
How can I transpose a data frame?
Can I strip the column names from a data frame?
Thanks.
Joe
-----------------------------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada L8S 4M4
email: jfox@mcmaster.ca
phone: 905-525-9140x23604
web: www.socsci.mcmaster.ca/jfox
-----------------------------------------------------
|