Re: [R] loop for in and decimals

2010-05-21 Thread David Winsemius
On May 21, 2010, at 2:18 PM, Robert U wrote: Dear R-users, I'm trying to make the following loop: for (x in 0 : 10) and i would like x to be decimals rather than integers, giving a x range of e.g. 0.0 0.1 0.2 0.3 ... 9.9, 10. Would anyone know how to do that ? with regards, Had you not

Re: [R] loop for in and decimals

2010-05-21 Thread Erik Iverson
Robert U wrote: Dear R-users, I'm trying to make the following loop: for (x in 0 : 10) and i would like x to be decimals rather than integers, giving a x range of e.g. 0.0 0.1 0.2 0.3 ... 9.9, 10. Would anyone know how to do that ? Please start new threads when you have a new question, do no

Re: [R] loop for in and decimals

2010-05-21 Thread Henrique Dallazuanna
Try this: for(x in seq(0, 10, by = 0.1)) On Fri, May 21, 2010 at 3:18 PM, Robert U wrote: > Dear R-users, > > I'm trying to make the following loop: for (x in 0 : 10) and i would like x > to be decimals rather than integers, giving a x range of e.g. 0.0 0.1 0.2 > 0.3 ... 9.9, 10. Would anyone

[R] loop for in and decimals

2010-05-21 Thread Robert U
Dear R-users, I'm trying to make the following loop: for (x in 0 : 10) and i would like x to be decimals rather than integers, giving a x range of e.g. 0.0 0.1 0.2 0.3 ... 9.9, 10. Would anyone know how to do that ? with regards,   [[alternative HTML version deleted]] __