Learn R Programming

seedy (version 1.3)

plotnetwork: Plot weighted transmission network

Description

For a given weighted adjacency matrix, plots a directed network illustrating transmission probabilities.

Usage

plotnetwork(probmat, labels, arrlen = 0.15, scale = 1, ...)

Arguments

probmat
Transmission probability matrix. The [i,j]th element represents the probability that person i infected person j.
labels
Labels representing row and columns in the probability matrix.
arrlen
Length of arrow heads (see arrows).
scale
Scaling for colors according to probability values.
...
Additional arguments to be passed to plot.

Examples

Run this code
data(outbreak)
K <- networkmat(outbreak$epidata[,1], outbreak$epidata[,4])
plotnetwork(K, labels=outbreak$epidata[,1])

Run the code above in your browser using DataLab