Re: [R] error with seq() used in for loop

2015-10-11 Thread Maram SAlem
I got you Berend. Thanks again On 11 October 2015 at 14:20, Berend Hasselman wrote: > > > On 11 Oct 2015, at 14:12, Maram SAlem wrote: > > > > Thanks a lot for your help and patience Duncan. > > It seems that my questions is really a trivial one but I never realized > > that 1:4 means 0 1 2 3

Re: [R] error with seq() used in for loop

2015-10-11 Thread Berend Hasselman
> On 11 Oct 2015, at 14:12, Maram SAlem wrote: > > Thanks a lot for your help and patience Duncan. > It seems that my questions is really a trivial one but I never realized > that 1:4 means 0 1 2 3 4 , never knew it starts from 0. > It doesn’t mean what you mention. 1:4 is the sequence 1 2 3

Re: [R] error with seq() used in for loop

2015-10-11 Thread Maram SAlem
Thanks Berend On 11 October 2015 at 14:10, Berend Hasselman wrote: > > > On 11 Oct 2015, at 13:52, Maram SAlem wrote: > > > > Dear All, > > I have a question concerning the seq() function arguments when used in a > > for() loop. > > I'll simplify this question to make it more clear. Suppose I h

Re: [R] error with seq() used in for loop

2015-10-11 Thread Maram SAlem
Thanks a lot for your help and patience Duncan. It seems that my questions is really a trivial one but I never realized that 1:4 means 0 1 2 3 4 , never knew it starts from 0. On 11 October 2015 at 14:07, Duncan Murdoch wrote: > On 11/10/2015 7:52 AM, Maram SAlem wrote: > > Dear All, > > I ha

Re: [R] error with seq() used in for loop

2015-10-11 Thread Berend Hasselman
> On 11 Oct 2015, at 13:52, Maram SAlem wrote: > > Dear All, > I have a question concerning the seq() function arguments when used in a > for() loop. > I'll simplify this question to make it more clear. Suppose I have a > (5*3)matrix s (for ex.) and I need to write a function with for() loop, i

Re: [R] error with seq() used in for loop

2015-10-11 Thread Duncan Murdoch
On 11/10/2015 7:52 AM, Maram SAlem wrote: > Dear All, > I have a question concerning the seq() function arguments when used in a > for() loop. > I'll simplify this question to make it more clear. Suppose I have a > (5*3)matrix s (for ex.) and I need to write a function with for() loop, in > each s

[R] error with seq() used in for loop

2015-10-11 Thread Maram SAlem
Dear All, I have a question concerning the seq() function arguments when used in a for() loop. I'll simplify this question to make it more clear. Suppose I have a (5*3)matrix s (for ex.) and I need to write a function with for() loop, in each step of the loop I need to generate a sequence whose up