> Duncan Murdoch
> on Wed, 09 Mar 2011 07:05:33 -0500 writes:
> On 11-03-09 4:41 AM, Ivan Calandra wrote:
>> Hi,
>>
>> There might be better solution, but I think this works
>> (got it by searching "source function" with
>> RSiteSearch()): attr(body(myPrint),
Thanks Ivan!
You've solved my problem!!
--
View this message in context:
http://r.789695.n4.nabble.com/Getting-the-source-file-s-name-where-the-custom-function-is-written-tp3343135p3343197.html
Sent from the R help mailing list archive at Nabble.com.
_
On 11-03-09 4:41 AM, Ivan Calandra wrote:
Hi,
There might be better solution, but I think this works (got it by
searching "source function" with RSiteSearch()):
attr(body(myPrint), "srcfile")
That's the right way, but it only works if srcrefs (debug information)
is kept. By default source()
Hi,
There might be better solution, but I think this works (got it by
searching "source function" with RSiteSearch()):
attr(body(myPrint), "srcfile")
Here is the original answer:
http://finzi.psych.upenn.edu/Rhelp10/2010-February/227805.html
HTH,
Ivan
Le 3/9/2011 10:19, raymondowf a écrit :
Dear R experts,
I've written some functions in a few source files (such as main.R,
control.R ...).
After loading them into R, how do I retrieve which functions are loaded
from which source file?
For example:
main.R has functions: myPrint(), myScan()
control.R has functions: setPrinter(), se
5 matches
Mail list logo