Dear Bill,

Your example works fine for me with R 1.6.2 under Windows 2000. The behaviour that you report should occur if you press RETURN at the browser prompt, but that seems unlikely.

John

At 02:07 PM 1/29/2003 -0500, Pikounis, Bill wrote:
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

[EMAIL PROTECTED]

Phone: 732 594 3913
Fax: 732 594 1565



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

______________________________________________
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help
____________________________
John Fox
Department of Sociology
McMaster University
email: [EMAIL PROTECTED]
web: http://www.socsci.mcmaster.ca/jfox

______________________________________________
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to