Re: [R] function coverage [solved?]

2013-01-15 Thread Ross Boylan
On Mon, 2013-01-14 at 13:08 -0800, Ross Boylan wrote: > Is there an easy way to identify all the functions called as a result of > invoking a function? Getting the calling hierarchy too would be nice, > but is definitely not essential. > > I'm trying to understand someone else's package, which is

Re: [R] function coverage

2013-01-15 Thread Keith Jewell
On 14/01/2013 22:25, Hadley Wickham wrote: I think codetools could do this reasonably well with the walkCode function, but I've never done it so I don't have sample code, and walkCode is mostly an internal function. There are a couple of approaches here: http://stackoverflow.com/questions/14276

Re: [R] function coverage

2013-01-14 Thread Hadley Wickham
> I think codetools could do this reasonably well with the walkCode function, > but I've never done it so I don't have sample code, and walkCode is mostly > an internal function. There are a couple of approaches here: http://stackoverflow.com/questions/14276728/ Hadley -- Chief Scientist, RStud

Re: [R] function coverage

2013-01-14 Thread Duncan Murdoch
On 13-01-14 4:08 PM, Ross Boylan wrote: Is there an easy way to identify all the functions called as a result of invoking a function? Getting the calling hierarchy too would be nice, but is definitely not essential. I think codetools could do this reasonably well with the walkCode function, b

Re: [R] function coverage

2013-01-14 Thread R. Michael Weylandt
Possibly you could trace() all the functions you're interested in. E.g., lapply(ls("package:stats"), trace) # Untested. MW On Mon, Jan 14, 2013 at 9:08 PM, Ross Boylan wrote: > Is there an easy way to identify all the functions called as a result of > invoking a function? Getting the calling h

[R] function coverage

2013-01-14 Thread Ross Boylan
Is there an easy way to identify all the functions called as a result of invoking a function? Getting the calling hierarchy too would be nice, but is definitely not essential. I'm trying to understand someone else's package, which is in a namespace and has some S3 functions. I could probably liv