This function plots epicontacts
objects using the
visNetwork
package. The produced object is an htmlwidget
which
will need rendering within a web browser.
vis_epicontacts(
x,
thin = TRUE,
node_color = "id",
label = "id",
annot = TRUE,
node_shape = NULL,
shapes = NULL,
edge_label = NULL,
edge_color = NULL,
legend = TRUE,
legend_max = 10,
x_axis = NULL,
col_pal = cases_pal,
NA_col = "lightgrey",
edge_col_pal = edges_pal,
width = "90%",
height = "700px",
selector = TRUE,
editor = FALSE,
edge_width = 3,
...
)
The same output as visNetwork
.
An epicontacts
object.
A logical indicating if the data should be thinned with thin
so that only cases with contacts should be plotted.
An index or character string indicating which field of the linelist should be used to color the nodes.
An index, logical, or character string indicating which fields
of the linelist should be used for labelling the nodes. Logical will be
recycled if necessary, so that the default TRUE
effectively uses all
columns of the linelist.
An index, logical, or character string indicating which fields
of the linelist should be used for annotating the nodes. Logical will be
recycled if necessary, so that the default TRUE
effectively uses all
columns of the linelist.
An index or character string indicating which field of the linelist should be used to determine the shapes of the nodes.
A named vector of characters indicating which icon code should
be used for each value node_shape
, e.g. c(m = "male", f =
"female")
if 'm' amd 'f' are values from node_shape
. See
codeawesome
for all available codes.
An index or character string indicating which field of the contacts data should be used to label the edges of the graph.
An index or character string indicating which field of the contacts data should be used to color the edges of the graph.
A logical indicating whether a legend should be added to the plot.
The maximum number of groups for a legend to be displayed.
Feature currently only available in development "timeline" branch.
A color palette for the nodes.
The color used for unknown group.
A color palette for the edges.
The width of the output, in html compatible format (e.g. '90%' or '800px').
The height of the output, in html compatible format (e.g. '800px').
A logical indicating if the selector tool should be used; defaults to TRUE.
A logical indicating if the editor tool should be used; defaults to FALSE.
An integer indicating the width of the edges. Defaults to 3.
Further arguments to be passed to visNetwork
.
Thibaut Jombart (thibautjombart@gmail.com) VP Nagraj (vpnagraj@virginia.edu) Zhian N. Kamvar (zkamvar@gmail.com)
visNetwork
in the package visNetwork
.
edges_pal
and cases_pal
for color palettes used