These functions read information from CRAN or within an R package's working directory to create a networks of a package's dependencies:
read_cran()
creates a network of a package's dependencies on other
packages available on CRAN.
It looks for the Depends
, Imports
and Suggests
fields
in the package's DESCRIPTION file
and creates a network where nodes are packages
and ties are dependencies.
read_pkg()
creates a network of function dependencies
from R scripts in a directory.
It looks for function definitions and function calls
within the scripts and creates a network
where nodes are functions and edges are function calls.
It can also include function calls
to functions not defined within the scripts.
read_cran(pkg = "all")
read_pkg(dir = getwd())
https://www.r-bloggers.com/2016/01/r-graph-objects-igraph-vs-network/
https://github.com/STATWORX/helfRlein/blob/master/R/get_network.R
A tidygraph
object representing the network of package dependencies
or function dependencies in a package.
Note that these functions are not as actively maintained as others in the package, so please let us know if any are not currently working for you or if there are missing import routines by raising an issue on Github.
as
Other makes:
make_create
,
make_ego
,
make_explicit
,
make_learning
,
make_motifs
,
make_play
,
make_random
,
make_read
,
make_stochastic
,
make_write
# mnet <- read_cran()
# mnet <- to_ego(mnet, "manynet", max_dist = 2)
# mnet <- read_pkg()