View source: R/plot_connectivity.R
plot_connectivity | R Documentation |
The function plot_connectivity
build an igraph object representing the wards connected by the professionals activities.
The function also generate a generic png plot.
plot_connectivity(
matContact,
size,
vertexcexrate = 3,
vertexcol = "grey",
edgewidthrate = 5,
netobj = FALSE,
verbose = TRUE
)
matContact |
Square matrix reporting the average proportion of time spent by professionals of a given ward in the different wards. Sum of rows must be equal to 1. The line width scale for edges will depend on this argument. |
size |
Vector of population size in each ward (beds, HCWS or sum of both). The size of the nodes/vertex/wards will depend on this argument. |
vertexcexrate |
Integer, proportional coefficient to adjust vertex names size. |
vertexcol |
Character, vector defining the colors of vertices in the plot. |
edgewidthrate |
Integer, proportional coefficient to adjust edge width. |
netobj |
Logical, define if the function return an igraph oject (TRUE) or a plot (FALSE). Default is FALSE. |
verbose |
Logical, activate production of details messages. |
If netobj is FALSE, the function returns a plot of wards network. If netobj is TRUE, the function returns an igraph object.
data("toydata")
list2env(toydata,envir=.GlobalEnv)
gdata <- build_gdata()
matContact <- randomContacts(pop_size_H, ward_names)$contactMat
plot_connectivity(matContact, pop_size_P)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.