Hi, I have a function which takes some time to execute (20 sec.) and I want to show the progress of the execution with simple messages such as "10% done", "20% done", ... (with a simple "cat" function). The problem is that all the messages appear together when the execution of the function is over. How can I show each message at their corresponding time? Thanks, Juan -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
"Juan Ramon Gonzalez" <jrgonzalez at ico.scs.es> writes:> Hi, > > I have a function which takes some time to execute (20 sec.) and I want to > show the progress of the execution with simple messages such as "10% done", > "20% done", ... (with a simple "cat" function). The problem is that all the > messages appear together when the execution of the function is over. How can > I show each message at their corresponding time?On Windows? Disable "buffered output" via the menus. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This would work under UNIX when running R on the command line. I think the Rgui terminal is buffered... the gurus out there might know a trick to flush it on request... On Tue, Jun 11, 2002 at 02:39:10PM +0200, Juan Ramon Gonzalez wrote:> Hi, > > I have a function which takes some time to execute (20 sec.) and I want to > show the progress of the execution with simple messages such as "10% done", > "20% done", ... (with a simple "cat" function). The problem is that all the > messages appear together when the execution of the function is over. How can > I show each message at their corresponding time? > > Thanks, > > Juan > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
In Rgui you can use flush.console(). Andy __________________________________ Andy Jaworski Engineering Systems Technology Center 3M Center, 518-1-01 St. Paul, MN 55144-1000 ----- E-mail: apjaworski at mmm.com Tel: (651) 733-6092 Fax: (651) 736-3122 |---------+-----------------------------> | | Laurent Gautier | | | <laurent at cbs.dtu.d| | | k> | | | | | | 06/11/2002 09:18 | | | | |---------+-----------------------------> >-----------------------------------------------------------------------------------------------------------------------------| | | | To: Juan Ramon Gonzalez <jrgonzalez at ico.scs.es> | | cc: r-help at stat.math.ethz.ch | | (bcc: Andrzej P. Jaworski/US-Corporate/3M/US) | | Subject: Re: [R] show messages during a long process | >-----------------------------------------------------------------------------------------------------------------------------| This would work under UNIX when running R on the command line. I think the Rgui terminal is buffered... the gurus out there might know a trick to flush it on request... On Tue, Jun 11, 2002 at 02:39:10PM +0200, Juan Ramon Gonzalez wrote:> Hi, > > I have a function which takes some time to execute (20 sec.) and I wantto> show the progress of the execution with simple messages such as "10%done",> "20% done", ... (with a simple "cat" function). The problem is that allthe> messages appear together when the execution of the function is over. Howcan> I show each message at their corresponding time? > > Thanks, > > Juan > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-> r-help mailing list -- Readhttp://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html> Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. -.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._._ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._