On Sun, Jun 1, 2014 at 6:06 PM, Fred Gruber <fgru...@gmail.com> wrote:
> Thanks William
> If I could just run an R command in the background and then just do sink 
> [sync?] 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 [also?] difficult...

It seems like that should be easy.  I don't know R well enough to do
that, but in Python it would be trivial, so maybe it is easy in R?

 -- William

> On Sunday, June 1, 2014 8:30:46 PM UTC-4, William wrote:
>>
>> On Sun, Jun 1, 2014 at 5:20 PM, Fred Gruber <fgr...@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...@googlegroups.com.
>> > To post to this group, send email to sage-s...@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.



-- 
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.

Reply via email to