I think your best option is to invest time in learning how to build an R
package, and then
package each project.  Conflicting names are not a problem when you have
them inside package
namespaces.  See the extensions document in R in the R distribution
R-2.15.0/doc/manual/R-exts.html

One way to handle breakpoints is with the ess-tracebug function inside ESS
inside emacs
http://code.google.com/p/ess-tracebug/
http://ess.r-project.org/
The
http://biostat.mc.vanderbilt.edu/wiki/Main/UseR-2012
conference is next week in Nashville.

We have a tutorial on ESS, which will include an introduction to
ess-tracebug, on Tuesday morning.

Rich
On Tue, Jun 5, 2012 at 8:12 PM, David Winsemius <dwinsemius@comcast.net>wrote:

>
> On Jun 5, 2012, at 7:51 PM, Michael wrote:
>
> Thanks so much for your help!
>>
>> I'd like but however I couldn't provide the code since they are not in
>> public domain...
>>
>> But lets imagine I inherited a big pile of R projects/codes from other
>> people and there are lots of "source"s in the programs.
>>
>> And there are many definitions of function "A" in the directories.
>>
>> I wanted to put a breakpoint into the relavant function "A" that's
>> currently in the workspace, i.e. the one I am using...
>>
>> To insert a breakpoint, I need to find its location in the file system...
>> I
>> need to find where it is...
>>
>> Simply searching by the name in the file system gave lots of hits...
>>
>
> You could go through and label each of the `A` functions with a comment
> that designated the file from which they were loaded.
>
> > func <- function() x
> > comment(func) <- "test"
> > comment(func)
> [1] "test"
>
> --
> David.
>
>
>
>> Thank you!
>>
>> On Tue, Jun 5, 2012 at 4:35 PM, Andrew Miles <rstuff.miles@gmail.com>
>> wrote:
>>
>> Can you provide an example of the code file that you use to call the
>>> different functions?  Without that it might be hard for people to answer
>>> your question.
>>>
>>> Offhand, I'd say that it is whatever version of function A was called
>>> last.  If you are loading functions into the workspace, they are treated
>>> as
>>> any other object, which is to say that you can only have one function of
>>> the same name at a time.  Hence whenever you call a source file to load
>>> in
>>> function A, the old function A gets overwritten.
>>>
>>> Andrew Miles
>>>
>>>
>>> On Jun 5, 2012, at 4:58 PM, Michael wrote:
>>>
>>> Hi all,
>>>>
>>>> How do I obtain the current active path of a function that's being
>>>>
>>> called?
>>>
>>>>
>>>> That's to say, I have several source files and they all contain
>>>>
>>> definition
>>>
>>>> of function A.
>>>>
>>>> I would like to figure out which function A and from which file is the
>>>>
>>> one
>>>
>>>> that's being called and is currently active?
>>>>
>>>> Thanks a lot!
>>>>
>>>>     [[alternative HTML version deleted]]
>>>>
>>>> ______________________________**________________
>>>> R-help@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>
>>> <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@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.
>>
>
> David Winsemius, MD
> West Hartford, CT
>
>
> ______________________________**________________
> R-help@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]]

