On Sun, Jun 1, 2014 at 5:20 PM, Fred Gruber <fgru...@gmail.com> wrote: > Hello > I have noticed that when in the notebook in R mode when you run a function > that takes a long time and prints status at every loop this output will not > show in the cell output window until the end of the operation. If I'm in > python mode and run a print statement in a for loop we get to see the output > at every loop and not just at the end. > > Is there a way to get a similar behavior when running R code? perhaps we can > use the sink function to redirect the output?
Here's a minimal test case to illustrate the issue: for (i in 1:5 ) { print(i) Sys.sleep(1) } Implementing what you want would unfortunately be fairly nontrivial since currently the output is only got after the output prompt appears in the output stream. The R kernel for IPython notebook might solve this problem in a different way (I don't know) - it would be worth trying. -- William > > thanks > Fred > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-support+unsubscr...@googlegroups.com. > To post to this group, send email to sage-support@googlegroups.com. > Visit this group at http://groups.google.com/group/sage-support. > For more options, visit https://groups.google.com/d/optout. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.