1

I’m trying to map the within package dependencies between functions. For instance, the data.table function week calls function yday from data.table. Is there any function that can do this?

PS: I know function foodweb and find.funs from mvbutils package can do this, but the code used is quite complex (as it adds visualizations) and not particularly well commented.

user3507584
  • 3,246
  • 5
  • 42
  • 66
  • That package calls `foodweb` from `mvbutils` package in its functions. I am trying to avoid dependencies from other packages and built a more neater solution (just matrices, avoid visualizations,etc.). – user3507584 Jul 25 '18 at 13:23
  • So what exactly are the requirements for your answer? You already found a function but it's not good enough? This is a pretty difficult task. When asking for help, you should include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. Nearly everything in R is a function including `[` and `$` and `<-` – MrFlick Jul 25 '18 at 13:53
  • Possible duplicate: https://stackoverflow.com/questions/11872879/finding-out-which-functions-are-called-within-a-given-function – MrFlick Jul 25 '18 at 13:53
  • @MrFlick Sorry it wasn't clear. I am only interested in finding within package dependencies, so even if `[` is a function, if it was not defined in the package I wouldn't be interested in it. – user3507584 Jul 25 '18 at 14:16
  • maybe by using `getParseData(week)` and `ls(getNamespace("data.table"), all.names = TRUE)` ? `getParseData` is behaving odd in my system (not reproducing the examples) so I can't test it. – moodymudskipper Jul 25 '18 at 15:09

0 Answers0