Keith Jewell
2011-Sep-29 11:11 UTC
[Rd] Finding inter-function dependencies within a package
Hi, I'd like to know which functions in a package call one specific function. I think I've seen a tool for identifying such dependencies, but now I can't find it :-( Searches of help and R site search for keywords like function, call, tree, depend haven't helped :-( Can anyone point me in the right direction? Thanks in advance, Keith Jewell
Rainer M Krug
2011-Sep-29 11:15 UTC
[Rd] Finding inter-function dependencies within a package
On Thu, Sep 29, 2011 at 1:11 PM, Keith Jewell <k.jewell@campden.co.uk>wrote:> Hi, > > I'd like to know which functions in a package call one specific function. > I think I've seen a tool for identifying such dependencies, but now I can't > find it :-( >Roxygen had the functionality to draw dependency graphs - but I think it has been excluded in Roxygen2? Rainer> Searches of help and R site search for keywords like function, call, tree, > depend haven't helped :-( > > Can anyone point me in the right direction? > > Thanks in advance, > > Keith Jewell > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >-- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug [[alternative HTML version deleted]]
Duncan Murdoch
2011-Sep-29 12:04 UTC
[Rd] Finding inter-function dependencies within a package
On 11-09-29 7:11 AM, Keith Jewell wrote:> Hi, > > I'd like to know which functions in a package call one specific function. > I think I've seen a tool for identifying such dependencies, but now I can't > find it :-( > Searches of help and R site search for keywords like function, call, tree, > depend haven't helped :-( > > Can anyone point me in the right direction?codetools::findGlobals could be used to do this. Duncan Murdoch> > Thanks in advance, > > Keith Jewell > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
Mark.Bravington at csiro.au
2011-Sep-30 00:07 UTC
[Rd] Finding inter-function dependencies within a package
Hi Keith 'foodweb' and friends in the 'mvbutils' package should do what you're after. For example, I just tried this on the 'debug' package:> ff <- foodweb( where=asNamespace( 'debug'))> # Now either just eyeball the dependency graph that 'foodweb' produces, or more formally:> callers.of( 'find.debug.HQ', ff)[1] ".end.incarnation" ".onLoad" "bp" "check.legality" [5] "debug.eval.guts" "debug.q" "debug.Recall" "debug.with" [9] "debug.within" "dismiss.debug.window" "enact.command.r" "eval.catching.errors" [13] "evaluator" "find.active.control.frame" "get.mtraced.callers" "launch.debug.windows" [17] "qqq" "set.global.debug.vars" "stepping" "try2" HTH Mark -- Mark Bravington CSIRO Mathematical & Information Sciences Marine Laboratory Castray Esplanade Hobart 7001 TAS ph (+61) 3 6232 5118 fax (+61) 3 6232 5012 mob (+61) 438 315 623 Keith Jewell wrote:> Hi, > > I'd like to know which functions in a package call one specific > function. > I think I've seen a tool for identifying such dependencies, but now I > can't find it :-( Searches of help and R site search for keywords > like function, call, tree, depend haven't helped :-( > > Can anyone point me in the right direction? > > Thanks in advance, > > Keith Jewell > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel