[BioC] Help with rearranging dataframe

Sean Davis seandavi at gmail.com
Tue Sep 29 22:36:06 CEST 2009

On Tue, Sep 29, 2009 at 3:47 PM, Sean Davis <seandavi at gmail.com> wrote:
> On Tue, Sep 29, 2009 at 3:39 PM, Hari Easwaran <hariharan.pe at gmail.com> wrote:
>> Hi all,
>> I have another question with handling dataframes.
>> I have a dataframe with the 1-st column as probenames (agilent) and the
>> remaining columns are the intensity values from multiple samples. I want to
>> order this table such that the order of the probenames correspond to the
>> order of the genes on the chromosome. To do this I have another table which
>> has teh probenames in this order.
> Probably the simplest way is to merge the two data.frames first.  See
> the merge() function.  After merging, then do your reordering on the
> merged data.frame.

I should have mentioned that the more "Bioconductor" way of doing this
is to combine these two data frames into an "ExpressionSet" object
with the probe information in the featureData() slot and the
expression values in the assayData.  Then, ordering things, subsetting
things, etc., is fairly straightforward and less error-prone.


More information about the Bioconductor mailing list