Re: [R] 'break' function in loop

2012-03-01 Thread pei-chien tsai
Thank you so much Jim, Duncan, and special thanks to Rui!! The modified script from Rui works perfectly and I really learned a lot from all your suggestions. Regards, Amber -- View this message in context: http://r.789695.n4.nabble.com/break-function-in-loop-tp4435033p4435399.html Sent from t

Re: [R] 'break' function in loop

2012-03-01 Thread Rui Barradas
Hello, jholtman wrote > > I have never seen 'break' used in an 'ifelse'; you probably meant to > use an 'if' statement there. > > On Thu, Mar 1, 2012 at 8:24 AM, Tsai, Pei-Chien > wrote: >> Dear R helpers, >> >> I have some difficulties in using 'break' function with loop,

Re: [R] 'break' function in loop

2012-03-01 Thread Duncan Murdoch
On 12-03-01 8:24 AM, Tsai, Pei-Chien wrote: Dear R helpers, I have some difficulties in using 'break' function with loop, and the followings are my script. What I try to do is (1) permute 'or' first; (2) doing t-test if this 'or' pass criteria 1 (k=1); (3) end the loop when I get 10 permutati

Re: [R] 'break' function in loop

2012-03-01 Thread jim holtman
I have never seen 'break' used in an 'ifelse'; you probably meant to use an 'if' statement there. On Thu, Mar 1, 2012 at 8:24 AM, Tsai, Pei-Chien wrote: > Dear R helpers, > > I have some difficulties in using 'break' function with loop, and the > followings are my script. What I try to do is (1)

[R] 'break' function in loop

2012-03-01 Thread Tsai, Pei-Chien
Dear R helpers, I have some difficulties in using 'break' function with loop, and the followings are my script. What I try to do is (1) permute 'or' first; (2) doing t-test if this 'or' pass criteria 1 (k=1); (3) end the loop when I get 10 permutations; (4) redo everything again but this time u