s-news
[Top] [All Lists]

Re: (pas d'objet)

To: Marion VERDOIT <Marion.Verdoit@ifremer.fr>, "S-news@wubios.wustl.edu" <S-news@wubios.wustl.edu>
Subject: Re: (pas d'objet)
From: "Timothy J. Wade" <tjwade@uclink4.berkeley.edu>
Date: Thu, 30 Nov 2000 12:09:43 -0800
In-reply-to: <3A269053.E9D302E7@ifremer.fr>
Try this:
a<-c("NA","1", "NA", "5", "NA", "6","8","10")
x<-c(1:length(a))

z<-z[a=="NA"]

z should contain the positions of a where a is "NA"



At 06:37 PM 11/30/2000 +0100, Marion VERDOIT wrote:
Hello,
I have a vector
a<-c("NA","1", "NA", "5", "NA", "6","8","10")
I want the positions of the "NA"s in a, i.e.:
1 3 5
I try
match("NA", a), but it returns only the first position :
> 1
have you the solution?
Thank you
---------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news


<Prev in Thread] Current Thread [Next in Thread>