From spinuvit at gmail.com  Tue Aug 13 14:44:51 2013
From: spinuvit at gmail.com (Vitalie Spinu)
Date: Tue, 13 Aug 2013 14:44:51 +0200
Subject: [Rd] Source location of currently evaluated code?
Message-ID: <87ppthzrng.fsf@gmail.com>


Hi, 

Is there a way to retrieve the parsed location of currently executed
function?

In other words, how to define a function "foo" such that when sourced
from a file "file_with_foo.R" containing foo() at line 1, it should
print:

    foo called in file_with_foo.R at line 1


Thanks, 

  Vitalie



[Rd] Source location of currently evaluated code?
Vitalie Spinu