get_network | R Documentation |
With this function a network plot of the connections of the functions in a given path can be created.
get_network(
dir = NULL,
variations = c("<- function", " <- function", "<-function", " <-function"),
pattern = "\\.R$",
simplify = FALSE,
all_scripts = NULL,
use_internals = TRUE,
exclude = NULL,
verbose = FALSE
)
dir |
a path that includes the functions |
variations |
a character vector with the function's definition string. The default is c(" <- function", "<- function", "<-function"). |
pattern |
a string with the file suffix - default is "\.R$". |
simplify |
a boolean, if |
all_scripts |
a named list with script. The given path is dominant. This is mainly used for debugging purposes. |
use_internals |
a boolean, if |
exclude |
a vector with folder's or function's names, that are excluded from the network creation. This is done by a regex, so it will remove everything that contains these words. |
verbose |
a boolean setting the debugging prints. |
Returns an object with the adjacency matrix $matrix
,
an igraph object $igraph
, a table for the edges $edge_dt
,
a table for the nodes $node_dt
and
a networkD3 plot $networkD3
.
TODO: list with exclude files and comments ' ' in one line
TODO: maybe return plot
Jakob Gepp
For more information check out our blog. Also there is a README on how to use this function here.
## Not run:
net <- get_network(dir = "R/", simplify = TRUE)
g1 <- net$igraph
plot(g1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.