[R] browser/debug and for loop
Vadim Ogranovich
vograno at arbitrade.com
Sat Jun 29 00:54:49 CEST 2002
Dear R-Users,
It seems like once one invokes browser() inside a loop and steps through the
body using 'n' any subsequent loop will be "intercepted" by debug()
function. Here is exactly what I mean
# fresh R session
# run a loop that has browser() inside the body
> for (i in seq(5)) { browser(); print(i) }
for (i in seq(5)) { browser(); print(i) }
Called from: NULL
Browse[1]> n
n
debug: print(i)
Browse[1]> Q
Q
# remove browser(), debug() is still there
> for (i in seq(5)) { print(i) }
for (i in seq(5)) { print(i) }
debug: i
Browse[1]> Q
Q
My guess is that when I was stepping through some function got flagged for
debugging. I tried to undebug "for", but that didn't work.
This is R.1.5.0 on RedHat Linux 7.1
Any suggestion will be appreciated.
Thanks, Vadim
P.S. I thought it might be useful to have a function that lists all
functions currently flagged for debugging.
--------------------------------------------------
DISCLAIMER
This e-mail, and any attachments thereto, is intended only for use by the
addressee(s) named herein and may contain legally privileged and/or
confidential information. If you are not the intended recipient of this
e-mail, you are hereby notified that any dissemination, distribution or
copying of this e-mail, and any attachments thereto, is strictly prohibited.
If you have received this e-mail in error, please immediately notify me and
permanently delete the original and any copy of any e-mail and any printout
thereof.
E-mail transmission cannot be guaranteed to be secure or error-free. The
sender therefore does not accept liability for any errors or omissions in
the contents of this message which arise as a result of e-mail transmission.
NOTICE regarding privacy and confidentiality
Knight Trading Group may, at its discretion, monitor and review the content
of all e-mail communications.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list