Re: [R] overleap an iteration within a for-loop when error message produced

2011-03-04 Thread Nicolas Berkowitsch
Dear Nick, Dear Philipp, Thanks for quick responses - it worked! Below the implemented solution - in case others are interested: ## This will lead to an error message library (mnormt) p = matrix(NA,9,1) for (subject in 2:10) { p[subject]=pmnorm(x = subject*c(-.3,1), varcov = matrix(c((-4)^

Re: [R] overleap an iteration within a for-loop when error message produced

2011-03-04 Thread Philipp Pagel
> Assume that the 5th iteration (subject=5) leads to the error > message. How can I tell R to continue with the 6th iteration? try or tryCatch are probably what you want. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissensc