[Rd] "What Calls What" diagram. Flow Chart?
pauljohn32 at gmail.com
Mon Oct 10 17:31:20 CEST 2011
On Sun, Oct 9, 2011 at 5:29 PM, <Mark.Bravington at csiro.au> wrote:
> Hi Paul
> Have you tried
> mvbutils::foodweb( where=asNamespace( 'lavaan'))
> (assuming lavaan has a namespace, otherwise where='package:lavaan')?
> Sounds like it's what you're after--
Thanks, Mark. The foodweb graph for lavaan is a bit overwhelming.
The graph shows everything it finds that might be called any time, it
doesn't help me trace the path of a specific user call to a particular
function. So I'm not entirely sure it is doing what I hope for.
While matching the graph against the source code, it seems to me some
R language idioms can confuse/break the foodweb. When eval is called
on a string object, then I think function calls can escape detection.
In the cfa example code I put in the original post, the function
"lavaan" is called by eval, and as far as I can tell in the foodweb
output, that connection is not found.
I'm still studying your package, of course, but here's (I think) an
example, I know "cfa" does call "lavaan" though eval, but this code
mvbutils::foodweb( where=asNamespace( 'lavaan'))
myfw <- mvbutils::foodweb( where=asNamespace( 'lavaan'))
>  "independence.model" "independence.model.fit"
 "independence.model.fit2" "setLavaanOptions"
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas
More information about the R-devel