s-news
[Top] [All Lists]

Re: [S] (pas d'objet)

To: Marion VERDOIT <Marion.Verdoit@ifremer.fr>
Subject: Re: [S] (pas d'objet)
From: Goran Brostrom <gb@stat.umu.se>
Date: Thu, 30 Sep 1999 17:49:36 +0200 (CEST)
Cc: "S-news@wubios.wustl.edu" <S-news@wubios.wustl.edu>
In-reply-to: <37F3834B.C48E1313@ifremer.fr>
Sender: owner-s-news@wubios.wustl.edu
How about

j <- sum(tableau[1:800000, 3] == 50)?

Göran

On Thu, 30 Sep 1999, Marion VERDOIT wrote:

> 
> Hello,
> I'm looking for a way to evit the use of for loops in this case, because
> it is too long to evaluate :
> 
> j<-0
> for (i in 1:800000)
> {if (tableau[i,3]==50) {j<-j+1}
> }

--------------------------------------------------------------
 Göran Broström
 Professor of Statistics               tel: +46 90 786-5223
 Umeå University                       fax: +46 90 786-6614
 S-90187 Umeå, Sweden               e-mail:  gb@stat.umu.se

 http://www.stat.umu.se/~gb          ftp://capa.stat.umu.se
--------------------------------------------------------------

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

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