Skip to content

Getting the list of lines evaluated in a function call

2 messages · Francois Rousseu, Duncan Murdoch

#
On 12-02-06 3:11 PM, Francois Rousseu wrote:
There isn't a function like that.  I think it would be hard to write one 
without internal changes to R, but those changes might not have to be 
too large if the function had srcref information included, because the 
evaluator does have access to that.

(One way to do it without changing R is to pre-process the function to 
add in lots of extra code that records where it is as it is being 
evaluated.   This is a little tricky to get right, but it might be 
quicker than waiting for the internal changes.)

Duncan Murdoch