Re: [R] Loop doesn't work

2009-12-01 Thread Trafim
Thanks a lot! I was afraid smth is wrong with my R syntaxis. On Tue, Dec 1, 2009 at 3:58 PM, Barry Rowlingson < b.rowling...@lancaster.ac.uk> wrote: > On Tue, Dec 1, 2009 at 2:01 PM, Trafim wrote: > > Hi everybody, > > > > I have the following problem, the following code seems to run only once >

Re: [R] Loop doesn't work

2009-12-01 Thread Barry Rowlingson
On Tue, Dec 1, 2009 at 2:01 PM, Trafim wrote: > Hi everybody, > > I have the following problem, the following code seems to run only once for > i and j and for k from one to M. > Doesn't R for increase the argument by itself? > > for (i in 1:N){ >  for (j in 1:(Tk-1)){ >  if((XGrid[i] < Xk[j+1])&(

[R] Loop doesn't work

2009-12-01 Thread Trafim
Hi everybody, I have the following problem, the following code seems to run only once for i and j and for k from one to M. Doesn't R for increase the argument by itself? for (i in 1:N){ for (j in 1:(Tk-1)){ if((XGrid[i] < Xk[j+1])&(Xk[j] <= XGrid[i])){ for (k in 1:M){ if ((R