Skip to content
Prev 179112 / 398513 Next

print value of variable to screen or alert box?

print(c(i, v[i])) 


Bill Venables
http://www.cmis.csiro.au/bill.venables/ 


-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of onyourmark
Sent: Saturday, 2 May 2009 9:59 PM
To: r-help at r-project.org
Subject: [R] print value of variable to screen or alert box?


I am trying to debug a loop. Is there a way to print the value of a variable
that is inside a loop? I have a vector v and inside a loop I have v[i] where
i is the index of the loop. Is there a way to see v[i] per loop so that I
can see what is going on?
Thanks