Dear R-users, I?m having for the first time a problem while printing out values in the screen, I have a function wich takes quite a long time to execute, and I thought it?d be useful to insert a print statement inside the main loop to keep control of the current iteration, however, for some reason, the prints() are not shown in real time, and only when I stop the execution, all prints up to the current iteration are shown. This never happened before, but we observed this problem today (in a machine with vista). Maybe any of you has experienced the same problem and/or has any idea? Thanks in advance!
See ?flush.console for (i in 1:1e2){ print(i) flush.console() } On Wed, Sep 9, 2009 at 7:28 AM, Amparo Albalate <amparo.albalate@uni-ulm.de>wrote:> Dear R-users, > I惴 having for the first time a problem while printing out values in the > screen, > I have a function wich takes quite a long time to execute, and I thought > it悲 be useful to insert a print statement inside the main loop to keep > control of the current iteration, > however, for some reason, the prints() are not shown in real time, and only > when I stop the execution, all prints up to the current iteration are > shown. This never happened before, > but we observed this problem today (in a machine with vista). > Maybe any of you has experienced the same problem and/or has any idea? > > Thanks in advance! > > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >-- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
If you are running with RGUI, change the mode to nonbuffered output under the Misc tab or use flush.console() On Wed, Sep 9, 2009 at 6:28 AM, Amparo Albalate<amparo.albalate at uni-ulm.de> wrote:> Dear R-users, > I? having for the first time a problem while printing out values in the > screen, > I have a function wich takes quite a long time to execute, and I thought it? > be useful to insert a print statement inside the main loop to keep control > of the current iteration, > however, for some reason, the prints() are not shown in real time, and only > when I stop the execution, all prints ?up to the current iteration are > shown. This never happened before, > but we observed this problem today (in a machine with vista). > Maybe any of you has experienced the same problem and/or has any idea? > > Thanks in advance! > > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve?