| gexf_js_config | R Documentation |
Uses the gexf-js JavaScript viewer by copying static files to a directory
and optionally launching a local web server via the servr package. For
the modern htmlwidget-based renderer, use plot.gexf or sigmajs.
gexf_js_config(
dir,
graphFile = "network.gexf",
showEdges = TRUE,
useLens = FALSE,
zoomLevel = 0,
curvedEdges = TRUE,
edgeWidthFactor = 1,
minEdgeWidth = 1,
maxEdgeWidth = 50,
textDisplayThreshold = 9,
nodeSizeFactor = 1,
replaceUrls = TRUE,
showEdgeWeight = TRUE,
showEdgeLabel = TRUE,
sortNodeAttributes = TRUE,
showId = TRUE,
showEdgeArrow = TRUE,
language = FALSE
)
plot_gexfjs(
x,
graphFile = "network.gexf",
dir = tempdir(),
overwrite = TRUE,
httd.args = list(),
copy.only = FALSE,
...
)
dir |
Directory where files are copied ( |
graphFile |
Name of the GEXF file written to |
showEdges |
Logical scalar. Default state of the "show edges" button (nullable). |
useLens |
Logical scalar. Default state of the "use lens" button (nullable). |
zoomLevel |
Numeric scalar. Default zoom level. At zoom = 0, the graph should fill a 800x700px zone |
curvedEdges |
Logical scalar. False for curved edges, true for straight edges this setting can't be changed from the User Interface. |
edgeWidthFactor |
Numeric scalar. Change this parameter for wider or narrower edges this setting can't be changed from the User Interface. |
minEdgeWidth |
Numeric scalar. |
maxEdgeWidth |
Numeric scalar. |
textDisplayThreshold |
Numeric scalar. |
nodeSizeFactor |
Numeric scalar. Change this parameter for smaller or larger nodes this setting can't be changed from the User Interface. |
replaceUrls |
Logical scalar. Enable the replacement of Urls by Hyperlinks this setting can't be changed from the User Interface. |
showEdgeWeight |
Logical scalar. Show the weight of edges in the list this setting can't be changed from the User Interface. |
showEdgeLabel |
Logical scalar. |
sortNodeAttributes |
Logical scalar. Alphabetically sort node attributes. |
showId |
Logical scalar. Show the id of the node in the list this setting can't be changed from the User Interface. |
showEdgeArrow |
Logical scalar. Show the edge arrows when the edge is directed this setting can't be changed from the User Interface. |
language |
Either |
x |
An object of class |
overwrite |
Logical scalar. Overwrite existing files in |
httd.args |
Further arguments passed to servr::httd. |
copy.only |
Logical. When |
... |
Further arguments passed to gexf_js_config. |
Currently, the only languages supported are: German (de), English (en), French (fr), Spanish (es), Italian (it), Finnish (fi), Turkish (tr), Greek (el), Dutch (nl)
The server is launched only when interactive() == TRUE and
copy.only == FALSE.
gexf-js project website https://github.com/raphv/gexf-js.
if (interactive()) {
path <- system.file("gexf-graphs/lesmiserables.gexf", package = "rgexf")
graph <- read.gexf(path)
plot_gexfjs(graph)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.