
Plot interactive visualisation of object-relationship network of package.
Source:R/plot.R
plot_network.RdPlot interactive visualisation of object-relationship network of package.
Arguments
- s
Package statistics obtained from pkgstats function.
- plot
If
TRUE, plot the network which opens an interactive browser pane.- vis_save
Name of local file in which to save
htmlfile of network visualisation (will overrideplottoFALSE).
Value
(Invisibly) A pkgstats_network object: a list of the nodes and
edges used to construct the network, along with the self-contained
html document itself.
Note
Edge thicknesses are scaled to centrality within the package function
call network. Node sizes are scaled to numbers of times each function is
called from all other functions within a package. The visualisation is
rendered with a small bundle of D3-based JavaScript shipped with
this package (see system.file ("js", package = "pkgstats")), so no
internet connection or additional R packages are required to view it.
Examples
f <- system.file ("extdata", "pkgstats_9.9.tar.gz", package = "pkgstats")
# \donttest{
p <- pkgstats (f)
net <- plot_network (p, plot = FALSE)
# }
# use default 'plot = TRUE' to automatically open network in browser.