[R] browser() misbehavior ?

Pikounis, Bill v_bill_pikounis at merck.com
Wed Jan 29 20:09:02 CET 2003


Under v1.6.2, Windows NT4 OS, when a function contains an execution error
and I have placed browser() in inside the function body, the call to browser
is ignored.  A brief example to illustrate:

> foo <- function(x) {
+   y <- x ^ 2
+   browser()
+   foo2(x)  ## Intentional error
+   x ^ 3  
+ }
> 

> foo(30)
Called from: foo(30)
Browse[1]> 
Error in foo(30) : couldn't find function "foo2"

## browser() still seems to be ignored even if a function has no execution
error

> traceback()
1: foo(30)

Has anyone else experienced this?  I am using v1.6.2 on Windows NT 4. 

Under Linux i686 (Mandrake 9.0), the same example works as expected;
execution is stopped and I can usefully browser() as it is designed.

As always, any advice is welcome.

Thanks,
Bill

----------------------------------------
Bill Pikounis, Ph.D.
Biometrics Research Department
Merck Research Laboratories
PO Box 2000, MailDrop RY84-16  
126 E. Lincoln Avenue
Rahway, New Jersey 07065-0900
USA

v_bill_pikounis at merck.com

Phone: 732 594 3913
Fax: 732 594 1565



------------------------------------------------------------------------------




More information about the R-help mailing list