Dear listers,
Hi .
I googled before I ask this question in case to avoid violating the
"list law". The question was proposed by somebody else but nobody
gives a proper solution.
How to ignore errors in a R loop? I have a R source file ,namely,
test.r.
I ran a loop in a command line
> for(i in 1 : 100 ) {source("test.r",echo =T ) }
and I found that when test.r have some error the loop will stop, but
test.r is just stochastically wrong,i.e., sometimes it works well if
no bad values return.
I want to know how to ignore such errors and let the loop continue.
thanks in advance.
_______________________
Jiang Peng, Ph.D. Candidate
Department of Mathematics &
Antai college of Economics and Management
Shanghai Jiao Tong University
Address: Room 431, #3 Building, Xuhui Campus
E-mail: jp021 at sjtu.edu.cn
jp021 at 126.com
MSN: jp021 at hotmail.com
iChat: mathfrog at mac.com
Mobile: +86-138 168 780 95
______________________________________________
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.