[R] help! "browser()" does not get stopped...

Duncan Murdoch murdoch.duncan at gmail.com
Tue Dec 6 19:04:30 CET 2011


On 06/12/2011 12:45 PM, Michael wrote:
> yeah, any one line command of checking which function is currently in the
> memory?

As Uwe said, that's not a very useful thing to do.   But if you know the 
name you're looking for, find() is useful.  For example,

Browse[1]> find("mean")
[1] "package:base"

You might also want find("mean", mode="function"), in case you've also 
got a non-function named "mean".

Duncan Murdoch

> so if I find any function not in the .GlobalEnv.
> then I know what the problem is?
>
> 2011/12/6 Uwe Ligges<ligges at statistik.tu-dortmund.de>
>
> >
> >
> >  On 06.12.2011 18:29, Michael wrote:
> >
> >>  how do I check and make sure? thx
> >>
> >
> >  E.g. insert cat("Hello World!\n") in the first line of your function you
> >  called "subroutine".
> >
> >  Best,
> >  Uwe Ligges
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >>  On 12/6/11, Uwe Ligges<ligges at statistik.tu-**dortmund.de<ligges at statistik.tu-dortmund.de>>
> >>   wrote:
> >>
> >>>
> >>>
> >>>  On 06.12.2011 18:06, Michael wrote:
> >>>
> >>>>  It's weird!
> >>>>
> >>>>  I am sure that I have inserted "browser()" in a sub-routine where I
> >>>>  wanted to stop and debug...
> >>>>
> >>>>  But when I start running the main function from the separate main file,
> >>>>
> >>>>  it doesn't stop within the target sub-routine at all.
> >>>>
> >>>
> >>>  Probably you are using some package and call the "subroutine" within the
> >>>  NAMESPACE of the package rather than the one in .GlobalEnv.
> >>>
> >>>  Uwe Ligges
> >>>
> >>>
> >>>  Please help me!
> >>>>
> >>>>  Thanks!
> >>>>
> >>>>  ______________________________**________________
> >>>>  R-help at r-project.org mailing list
> >>>>  https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
> >>>>  PLEASE do read the posting guide
> >>>>  http://www.R-project.org/**posting-guide.html<http://www.r-project.org/posting-guide.html>
> >>>>  and provide commented, minimal, self-contained, reproducible code.
> >>>>
> >>>
> >>>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list