Description Usage Arguments Details Value Author(s) See Also Examples
For a given function, exhaustively determine which functions are in turn called by that function. This is designed to search within a subset of packages - perhaps ones that you are actively coding. This method will also tell you which CRAN or BioConductor packages are also referenced.
1 2 3 | get.function.dependencies(fun,
packages = c(list.my.packages(src.root = getOption("src.root")), ".GlobalEnv"),
verbose = FALSE)
|
fun |
either a function name, of the function's code |
packages |
vector of packages to search for
dependencies in (ie packages that you probably wrote),
Include |
verbose |
print the recursive dependency trace |
If you've ever wanted to give someone a single function from within a package full of code, then you've probably forgotten about some of the code that this function depends upon, which you wrote & which is not available on CRAN/BioC. Given a single function, this method will determine all the code dependencies, ie all the functions which will ever get called. This is exhaustive, in that it doesn't only look for functions inside conditional statements – all functions are returned. It only searches within a limited set of packages, such as those that you may have written yourself & not published yet. It will also tell you which CRAN/BioC packages need to be installed, but will ignore those packages which are automatically loaded at startup.
A list with these elements:
my.functions |
a
character vector of all functions that are called, that
are also in the |
my.function.packages |
a vector indicating which package each function came from |
cran |
a vector of CRAN packages that are referenced |
bioc |
a vector of BioConductor packages that are referenced |
other.packages |
a vector of other packages not from CRAN, or BioConductor, or my.packages |
Mark Cowley
1 2 3 | options(src.root="~/src/R")
get.function.dependencies("updateR")
get.function.dependencies(updateR)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.