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
> 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
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
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
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
5 matches
Mail list logo