ttable | R Documentation |
Generates a contingency table based on 'from' (infector) and 'to' (infectee) vectors.
ttable(from, to, levels = NULL, ...)
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 |
A contingency table of infectors (rows) and infectees (columns).
from <- c("A", "A", NA, "C", "C", "C")
to <- c("A", "B", "B", "C", "C", "C")
ttable(from, to)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.