[R] How do I obtain the current active path of a function that's being called?

Andrew Miles rstuff.miles at gmail.com
Tue Jun 5 23:35:54 CEST 2012


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 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