| make_cran | R Documentation |
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())
pkg |
The name |
dir |
Character string or vector of character strings
with the directory or directories to search for R scripts.
If |
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.
A tidygraph object representing the network of package dependencies
or function dependencies in a package.
Jakob Gepp
https://www.r-bloggers.com/2016/01/r-graph-objects-igraph-vs-network/
https://github.com/STATWORX/helfRlein/blob/master/R/get_network.R
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.