Hi, newbie question. I have a data-frame with 3 named columns: Name, Obs1, Obs2. The Name column members are made of alphanumeric characters: T1, T2, T3 etc. I would like to acess only that subset of the data-frame with Name == T44. X <- dataframe[dataframe$Name=='T44'] does not work. Any ideas on how to do this? I'm sure I'm missing a simple concept here. Thanks, Anjan -- ============================anjan purkayastha, phd bioinformatics analyst whitehead institute for biomedical research nine cambridge center cambridge, ma 02142 purkayas [at] wi [dot] mit [dot] edu 703.740.6939 [[alternative HTML version deleted]]
Hi there, Try ?subset ?str may also be useful.. bests milton On Sun, Oct 18, 2009 at 11:10 PM, ANJAN PURKAYASTHA < anjan.purkayastha@gmail.com> wrote:> Hi, > newbie question. I have a data-frame with 3 named columns: Name, Obs1, > Obs2. > The Name column members are made of alphanumeric characters: T1, T2, T3 > etc. > I would like to acess only that subset of the data-frame with Name == T44. > X <- dataframe[dataframe$Name=='T44'] does not work. > Any ideas on how to do this? > I'm sure I'm missing a simple concept here. > > Thanks, > Anjan > > > -- > ============================> anjan purkayastha, phd > bioinformatics analyst > whitehead institute for biomedical research > nine cambridge center > cambridge, ma 02142 > > purkayas [at] wi [dot] mit [dot] edu > 703.740.6939 > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Thank you all who replied to my post. That cleared things up very well Anjan On Sun, Oct 18, 2009 at 11:10 PM, ANJAN PURKAYASTHA < anjan.purkayastha@gmail.com> wrote:> Hi, > newbie question. I have a data-frame with 3 named columns: Name, Obs1, > Obs2. > The Name column members are made of alphanumeric characters: T1, T2, T3 > etc. > I would like to acess only that subset of the data-frame with Name == T44. > X <- dataframe[dataframe$Name=='T44'] does not work. > Any ideas on how to do this? > I'm sure I'm missing a simple concept here. > > Thanks, > Anjan > > > -- > ============================> anjan purkayastha, phd > bioinformatics analyst > whitehead institute for biomedical research > nine cambridge center > cambridge, ma 02142 > > purkayas [at] wi [dot] mit [dot] edu > 703.740.6939 >-- ============================anjan purkayastha, phd bioinformatics analyst whitehead institute for biomedical research nine cambridge center cambridge, ma 02142 purkayas [at] wi [dot] mit [dot] edu 703.740.6939 [[alternative HTML version deleted]]