0
$\begingroup$

I am computing a long Table[], but the computation of the last few elements is taking too long, and I am afraid I will never converge. I would like to access the part of the Table which has been already computed and then abort the evaluation. Is that possible and how? Thanks.

$\endgroup$
2
$\begingroup$

Perhaps you can adapt something like this

partial = Reap[CheckAbort[full=Table[Sow[expr]; expr, {i,1,1000}], Null]][[2,1]]
| improve this answer | |
$\endgroup$
  • $\begingroup$ You could also use TimeConstrained instead of CheckAbort. $\endgroup$ – 2012rcampion Mar 25 '15 at 17:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.