[Rd] Source location of currently evaluated code?

Vitalie Spinu spinuvit at gmail.com
Tue Aug 13 14:44:51 CEST 2013


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



More information about the R-devel mailing list