Thanks William
If I could just run an R command in the background and then just do sink to 
redirect the outputs to a log file then I would be able to check the log 
whenever I want and that would work too. But from your other post it seems 
that this is algo difficult...

On Sunday, June 1, 2014 8:30:46 PM UTC-4, William wrote:
>
> On Sun, Jun 1, 2014 at 5:20 PM, Fred Gruber <[email protected] 
> <javascript:>> 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 [email protected] <javascript:>. 
> > To post to this group, send email to [email protected] 
> <javascript:>. 
> > 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to