net.plot | R Documentation |
Produces network plot where nodes represent treatments and edges represent direct evidence (e.g an RCT) comparing treatments.
net.plot(
data,
node.scale = 5,
edge.scale = 2,
flag = NULL,
study.counts = FALSE,
label.offset1 = 0,
label.offset2 = 0,
graph.scale = TRUE,
node.lab.cex = 1,
edge.lab.cex = 1,
node.colour = "#f69c54",
edge.colour = "grey",
edge.lab.colour = "blue",
flag.edge.colour = "lightpink",
layout = "layout_in_circle",
layout.params = NULL
)
data |
A |
node.scale |
Size of the nodes (default = 5) |
edge.scale |
Thickness of the edges (default = 2). |
flag |
Used to highlight direct comparisons to particular treatments (optional). Set this value to treatment(s) of interest and it will highlight, in red, all of the edges going into the specified treatment(s). |
study.counts |
If TRUE, prints the number of studies on each edge. |
label.offset1 |
Node label offset relative to node. Default = 0. |
label.offset2 |
Additional label offset for nodes close to the x axis. Default = 0. |
graph.scale |
Whether to make edges and nodes proportionally larger with the number of studies/arms. Default is TRUE. |
node.lab.cex |
Size of node labels |
edge.lab.cex |
Size of edge labels |
node.colour |
Node colour (string) |
edge.colour |
Edge colour (string) |
edge.lab.colour |
Edge label colour (string) |
flag.edge.colour |
Color of flagged edges (string) |
layout |
Specifies how the nodes should be layed out in the graph. Default is "layout_in_circle". See |
layout.params |
Additional parameters to be passed to the chosen 'layout' function. See |
data.prep
, igraph::layout_
data(diabetes.sim)
diabetes.slr <- data.prep(
arm.data = diabetes.sim,
varname.t = "Treatment",
varname.s = "Study"
)
# use default settings
net.plot(diabetes.slr)
# Highlight all direct comparisons with Placebo. Adjust node and edge size, centre node labels
net.plot(
data = diabetes.slr,
node.scale = 4,
edge.scale = 1.5,
flag="Placebo",
label.offset1 = 0,
label.offset2 = 0
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.