ttable {o2ools} | R Documentation |
Compute the transmission contingency table
Description
Generates a contingency table based on 'from' (infector) and 'to' (infectee) vectors.
Usage
ttable(from, to, levels = NULL, ...)
Arguments
from |
A vector of infectors. |
to |
A vector of infectees. |
levels |
Optional. A vector of factor levels. Defaults to the unique, sorted values of 'from' and 'to'. |
... |
Additional arguments passed to the |
Value
A contingency table of infectors (rows) and infectees (columns).
Examples
from <- c("A", "A", NA, "C", "C", "C")
to <- c("A", "B", "B", "C", "C", "C")
ttable(from, to)
[Package o2ools version 0.0.1 Index]