Skip to content
Back to formatted view

Raw Message

Message-ID: <3D661D50-8C0C-40D0-A4A8-5592C7304420@comcast.net>
Date: 2013-11-20T03:14:25Z
From: David Winsemius
Subject: If commands in a while loop
In-Reply-To: <1384910563835-4680775.post@n4.nabble.com>

On Nov 19, 2013, at 5:22 PM, Hlebtomane wrote:

> Unfortunately, the while loop in the following code doesn't seem to work. It
> would be very nice
> if someone might help me, thanks in advance:
> 
> z = 0*c(1:1000)

I think it is more likely that you don't know what z looks like. Try `head(z)`


> 
>  while (sum(z) < 751){
>  for(mu in (900:1100)/10000){
>  for(i in(1:1000)) {
> 	z[i] <- V5[i]*exp(5*mu)
>  	
> 	if (z[i] >= 1276281) {z[i] <- 1}
> 	else{z[i] <- 0}	
> 	}
> 	}
>  			   }
-- 
David Winsemius
Alameda, CA, USA