[19361] in s-news-athena
Re: [S] (pas d'objet)
daemon@ATHENA.MIT.EDU (Goran Brostrom)
Thu Sep 30 12:01:54 1999
Date: Thu, 30 Sep 1999 17:49:36 +0200 (CEST)
From: Goran Brostrom <gb@stat.umu.se>
To: Marion VERDOIT <Marion.Verdoit@ifremer.fr>
Cc: "S-news@wubios.wustl.edu" <S-news@wubios.wustl.edu>
In-Reply-To: <37F3834B.C48E1313@ifremer.fr>
Message-Id: <Pine.LNX.4.10.9909301747470.4184-100000@capa.stat.umu.se>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
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