[S] while

David Wang (SWANG@vtvm1.cc.vt.edu)
Thu, 05 Feb 98 15:20:00 EST


Dear S+ users,

I wrote a program to update the values of a matrix by using
two while statement. But the outer loop does not change and stay at the initial
value.

Thank you for any comments or suggestion.

The program follows:
tox <- matrix(0,20, 20)
i <- 1
j<-1
while(j <= 20){
while(i <=20){
tox[i,j] <- "my calculation"
i <- i +1}
j <- j+1}

Note: the j loop just goes 1 time.

David
-----------------------------------------------------------------------
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