Description Usage Arguments Value Examples
Convert SEIR to XYZ coordinates fixed in a tetrahedron
1 | SEIR_to_SIR_E(data, ternary_vars = c("S", "I", "R"), group_var = "E")
|
data |
data frame with the following columns
|
ternary_vars |
named vector of the three variables to use as the sides
of the ternary plot. Can be of the form |
group_var |
name of the variable to use as the color/feature/grouping vector. column name that is associated with the time step. Can either be a string or a promisary symbol |
data frame with the transformed variables SEIR -> s, i, r, group variables
1 2 3 4 5 6 7 | seir <- data.frame(t = 0:3,
S = c(90, 80, 70, 60),
E = c(0, 10, 10, 10),
I = c(10, 10, 10, 10),
R = c(0, 0, 10, 20))
seir_xyz <- SEIR_to_XYZ(seir)
head(seir_xyz)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.