networkmat: Create adjacency matrix

Description Usage Arguments Value See Also Examples

View source: R/networkmat.R

Description

For a given set of infection routes, returns an adjacency matrix.

Usage

1
networkmat(ID, sources)

Arguments

ID

Vector of infective IDs

sources

Vector of infection sources corresponding to ID.

Value

Returns a matrix with the [i,j]th entry equal to 1 if the ith infective in ID infected the jth infective in ID.

See Also

ancestors

Examples

1
2
data(outbreak)
networkmat(outbreak$epidata[,1], outbreak$epidata[,4])

seedy documentation built on May 29, 2017, 10:58 a.m.