Re: [R] If-statement in for-loop

2013-12-11 Thread Gerrit Eichner
Hello, "gncl dzgn", your problem has a flavor of homework which is usually not delt with on this list. However, a few comments: 0. The description of your problem is rather vague, in particular, the meaning of "input" in the description of your "conditions" is unclear! (By the way, your main

[R] If-statement in for-loop

2013-12-10 Thread gncl dzgn
Hi everyone, you might find my question elementary but I am a beginner and unfortunately I can't fix the problem. So, I simulate this following algorithm and some values of c are NA. Therefore, I should add these following two if-statements but I don't know how I should do it in a for-loop.