Re: [R] Convert dataframe to table with counts where column names become row names

2009-08-06 Thread ghinkle
Wow. Very nice. Amazingly terse. I will throw out the looping function I just debugged... greg Henrique Dallazuanna wrote: > > Try this: > t(sapply(DF1, table)) > > On Thu, Aug 6, 2009 at 2:14 PM, ghinkle wrote: > >> >> Can anyone explain how best to go f

[R] Convert dataframe to table with counts where column names become row names

2009-08-06 Thread ghinkle
Can anyone explain how best to go from a dataframe to a table (or better yet a new dataframe) of counts, where the row names in the new table (or dataframe) are the column names of the original df. start w/ DF1 = Pos1 Pos2 Pos3 oligo1 G C A oligo2 U U A o