markus.liedgens@ipw.agrl.ethz.ch
2005-Jan-28 19:58 UTC
[Rd] print() from within a function - Windows specific? (PR#7584)
Full_Name: Markus Liedgens Version: Ever since 1.6 OS: Windows 98 / Windows Xp Submission from: (NULL) (81.63.111.226) To control the progress of a function one can consider to use print() to issue a message in the command window. However, using Win98 / R 1.9 or WinXP / R 2.0, this approach is of little usefulness, since all the print() commands are issued at once, just before the control returns to the command window. A test code could be: for(i in 1:10){ for(j in 1:1000){ for(k in 1:1000){} } print(i) } I once ask a linux / unix user and he was not able to reproduce the problem. Best regards ------------------------------------------------- Markus Liedgens Institut f?r Pflanzenwissenschaften - ETH Z?rich FEL Eschikon 33 8315 Lidau, Switzerland e-mail: markus.liedgens@ipw.agrl.ethz.ch -------------------------------------------------- 8315 Lindau
Prof Brian Ripley
2005-Jan-28 20:15 UTC
[Rd] (PR#7584) user failure to read the FAQ (was print() from within a function - Windows specific?)
Please read the rw-FAQ, Q6.3. for a discussion to this very useful *feature*. It has been in the FAQ since before 1.0.0. On Fri, 28 Jan 2005 markus.liedgens@ipw.agrl.ethz.ch wrote:> Full_Name: Markus Liedgens > Version: Ever since 1.6There is no such version of R, and never has been.> OS: Windows 98 / Windows Xp > Submission from: (NULL) (81.63.111.226) > > > To control the progress of a function one can consider to use print() to issue a > message in the command window. However, using Win98 / R 1.9 or WinXP / R 2.0, > this approach is of little usefulness, since all the print() commands are issued > at once, just before the control returns to the command window. A test code > could be: > > for(i in 1:10){ > for(j in 1:1000){ > for(k in 1:1000){} > } > print(i) > } > > I once ask a linux / unix user and he was not able to reproduce the > problem.-- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Peter Dalgaard
2005-Jan-28 20:23 UTC
[Rd] print() from within a function - Windows specific? (PR#7584)
markus.liedgens@ipw.agrl.ethz.ch writes:> To control the progress of a function one can consider to use print() to issue a > message in the command window. However, using Win98 / R 1.9 or WinXP / R 2.0, > this approach is of little usefulness, since all the print() commands are issued > at once, just before the control returns to the command window. A test code > could be: > > for(i in 1:10){ > for(j in 1:1000){ > for(k in 1:1000){} > } > print(i) > } > > I once ask a linux / unix user and he was not able to reproduce the problem.It IS a FAQ though... http://cran.r-project.org/bin/windows/base/rw-FAQ.html#The-output-to-the-console-seems-to-be-delayed -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907