Dear expeRts, i use sapply for loop, and i want to break it when i needed, how to do that? e.g.
sapply( 1:10, function(i) { if(i==5) break and jump out of the function sapply } ) I want to do it because i have to loop 1000000 times, but i don't know when it will break, that means, it may need break at i=5 or at i=50000, for the possible of the last case, i don't use for loop, because it slow(is it right?). So,if you happen to know it ,may you help me? -- PO SU mail: desolato...@163.com Majored in Statistics from SJTU ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.