pkgnet
pkgnet copied to clipboard
Function Network Plots Not 100% Repeatable
If you render the visualization for the function network multiple times in a row, you will see a few different versions.
To observe this, run:
library(pkgnet)
t <- CreatePackageReport("lubridate")
t[["PackageFunctionReporter"]]$plot_network()
... and repeat...
This happens because there's some amount of randomness to the graph layout functions. I think we should be able to solve this by doing set.seed
.
Compare repeated runs of
library(pkgnet)
foo <- FunctionReporter$new()
foo$set_package('baseballstats')
foo$graph_viz
vs.
library(pkgnet)
foo <- FunctionReporter$new()
foo$set_package('baseballstats')
set.seed(42)
foo$graph_viz