p_graph | R Documentation |
p_graphF
calculates the (recursive/reverse) dependencies of a (vector
of) package(s) and displays in the default browser a standard graph (F/Force
in the networkD3 terminology) of the package dependencies. It combines the
p_network
and n_graphF
functions.
p_graphF
calculates the (recursive/reverse) dependencies of a (vector
of) package(s) and displays in the default browser a Sankey graph
(in the networkD3 terminology) of the package dependencies. It combines the
p_network
and n_graphS
functions.
p_network
returns the (recursive/reverse) dependencies of a (vector
of) package(s) as a network of nodes and links.
n_graphF
taks as input a network of package nodes and links and displays
them in the default browser as a standard graph (F/Force in the networkD3
terminology) representing the package dependencies.
n_graphF
taks as input a network of package nodes and links and displays
them in the default browser as a Sankey graph (in the networkD3 terminology)
representing the package dependencies.
Remember that the option exclpkgs = ...
whose default value TRUE
is equivalent to
exclpkgs = c("graphics", "grDevices", "methods", "stats", "tools", "utils")
,
can substantially modify the aspect of the graph, especially for reverse = FALSE
.
p_graphF(..., char = NULL, which = "DIL", recursive = TRUE,
reverse = FALSE, exclpkgs = TRUE, group = 2, fontFamily = "serif",
fontSize = 11, linkDistance = 50, charge = -100,
crandb = get("crandb", envir = .GlobalEnv))
p_graphS(..., char = NULL, which = "DIL", recursive = TRUE,
reverse = FALSE, exclpkgs = TRUE, group = 2, fontFamily = "serif",
fontSize = 14, nodeWidth = 30, nodePadding = 10,
crandb = get("crandb", envir = .GlobalEnv))
p_network(..., char = NULL, which = "DIL", recursive = TRUE,
reverse = FALSE, exclpkgs = TRUE, crandb = get("crandb", envir =
.GlobalEnv))
n_graphF(netw, group = 2, fontFamily = "serif", fontSize = 11,
linkDistance = 50, charge = -100)
n_graphS(netw, group = 2, fontFamily = "serif", fontSize = 14,
nodeWidth = 30, nodePadding = 10)
... |
any format recognized by |
char |
(name to) a character vector. Use this argument if
|
which |
character vector. A sub-vector of
|
recursive |
logical. Search for (reverse) dependencies of (reverse) dependencies. |
reverse |
logical. Search for reverse dependencies. |
exclpkgs |
logical or character vector. |
group |
integer, currently 1, 2 or 3. The suffix of the "NGroup" column in netw. Define a scheme for colouring the nodes. |
fontFamily |
character. Either "serif" or "sans-serif". |
fontSize |
integer. The size of the font. |
linkDistance |
integer. The minimal distance of a link between two nodes. |
charge |
integer. A repulsive value between two nodes. |
crandb |
data.frame |
nodeWidth |
integer. The width of the rectangular nodes in the Sankey graph. |
nodePadding |
integer. The vertical space between two nodes in the same column of a Sankey graph. |
netw |
a list of class "pkgsnetwork" produced by |
## In real life, download crandb from CRAN or load it from your directory
## with functions crandb_down() or crandb_load().
## In this example, we use a small file.
crandb_load(system.file("data", "zcrandb.rda", package = "RWsearch"))
lst <- list("RWsearch", "visNetwork") ; lst
netw <- p_network(actuar, fitdistrplus, reverse = TRUE) ; netw
if (interactive()) {
p_graphF(lst)
p_graphS(RWsearch, visNetwork)
n_graphF(netw)
n_graphS(netw)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.