Re: [R] Simple column selection question- which and character lists

2009-08-31 Thread Erik Iverson
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of AllenL Sent: Monday, August 31, 2009 11:40 AM To: r-help@r-project.org Subject: [R] Simple column selection question- which and character lists Dear R-list, Seems simple but have tried multiple approaches, no l

Re: [R] Simple column selection question- which and character lists

2009-08-31 Thread Stefan Große
> I have a list of column names: > >names.species.bio.18=c("Achimillb","Agrosmitb","Amorcaneb","Andrgerab","Ascltubeb","Elymcanab","Koelcrisb","Lespcapib","Liataspeb","Lupipereb","Monafistb","Panivirgb","Petapurpb","Poaprateb","Querellib","Quermacrb","Schiscopb","Sorgnutab") > > I want to select t

Re: [R] Simple column selection question- which and character lists

2009-08-31 Thread milton ruser
Hi Allen, have you tryed: newDF<-sourceDF[,names.species.bio.18] This will create a new data.frame with only those species you have interest. By the way, your data.frame is called data? Case yes, avoid this, please. good luck milton On Mon, Aug 31, 2009 at 12:39 PM, AllenL wrote: > > Dear

Re: [R] Simple column selection question- which and character lists

2009-08-31 Thread baptiste auguie
Hi, I think you want %in% instead of == see ?"%in%" HTH, baptiste 2009/8/31 AllenL > > Dear R-list, > Seems simple but have tried multiple approaches, no luck. > > I have a list of column names: > > >names.species.bio.18=c("Achimillb","Agrosmitb","Amorcaneb","Andrgerab","Ascltubeb","Elymcana

[R] Simple column selection question- which and character lists

2009-08-31 Thread AllenL
Dear R-list, Seems simple but have tried multiple approaches, no luck. I have a list of column names: >names.species.bio.18=c("Achimillb","Agrosmitb","Amorcaneb","Andrgerab","Ascltubeb","Elymcanab","Koelcrisb","Lespcapib","Liataspeb","Lupipereb","Monafistb","Panivirgb","Petapurpb","Poaprateb","Qu