Re: [R] printing a variable during a loop

2010-10-22 Thread J . delasHeras
Thank you for this! I had also wanted in the past to do this, and ended up writing dummy files with informative names to a folder I set to collect these messages, so I'd check the folder to see the new files being generated... It did the job, and at the same time I could see how long it

Re: [R] printing a variable during a loop

2010-10-22 Thread Nick Sabbe
Not Disapprove -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of j.delashe...@ed.ac.uk Sent: vrijdag 22 oktober 2010 13:00 To: Joshua Wiley Cc: R-help Subject: Re: [R] printing a variable during a loop Thank you for this! I had also

Re: [R] printing a variable during a loop

2010-10-22 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of j.delashe...@ed.ac.uk Sent: Friday, October 22, 2010 4:00 AM To: Joshua Wiley Cc: R-help Subject: Re: [R] printing a variable during a loop Thank you for this! I had also

Re: [R] printing a variable during a loop

2010-10-22 Thread Joshua Wiley
I'm glad this has helped both of you, but as a note, David deserves the credit here---I just put the code together and tested it on Windows. Josh On Fri, Oct 22, 2010 at 3:59 AM, j.delashe...@ed.ac.uk wrote: Thank you for this! I had also wanted in the past to do this, and ended up writing

[R] printing a variable during a loop

2010-10-21 Thread Antonio Olinto
Hello, About looping, consider the example: for (i in 1:23194) { dat.stat[i,c(2:8)]-quantile(dat.bat[BL==block[i],2],prob=c(0,0.025,0.25,0.5,0.75,0.975,1)) print(i) } I'd like to have the value of i printed for each loop (step). As I could see the values of i are shown on screen only after

Re: [R] printing a variable during a loop

2010-10-21 Thread Adrienne Wootten
instead of print use this message(i) the message command is used for things like this and it will print the value of i as you are looping through, but you can also do this: message(Counter value is: ,i) which returns for i = 20 for example Counter value is 20 for more check out the message

Re: [R] printing a variable during a loop

2010-10-21 Thread Antonio Olinto
Thanks Adrienne, but I still in doubt. The behavior of print and message looks the same. Nothing is displayed on the screen after minutes of routine processing . All values of i are displayed only when I press the stop button (I'm under Windows) or when i reaches the maximum value.

Re: [R] printing a variable during a loop

2010-10-21 Thread David Winsemius
On Oct 21, 2010, at 8:58 PM, Antonio Olinto wrote: Thanks Adrienne, but I still in doubt. The behavior of print and message looks the same. Nothing is displayed on the screen after minutes of routine processing . All values of i are displayed only when I press the stop button (I'm under

Re: [R] printing a variable during a loop

2010-10-21 Thread Joshua Wiley
On Thu, Oct 21, 2010 at 12:03 PM, David Winsemius dwinsem...@comcast.net wrote: On Oct 21, 2010, at 8:58 PM, Antonio Olinto wrote: Thanks Adrienne, but I still in doubt. The behavior of print and message looks the same. Nothing is displayed on the screen after minutes of routine processing

Re: [R] printing a variable during a loop

2010-10-21 Thread Antonio Olinto
Thanks Joshua, David and Adrienne for the attention. flush.console() was what I need. All the best, Antonio Citando Joshua Wiley jwiley.ps...@gmail.com: On Thu, Oct 21, 2010 at 12:03 PM, David Winsemius dwinsem...@comcast.net wrote: On Oct 21, 2010, at 8:58 PM, Antonio Olinto wrote: