note that this does not need x,y,z to be scaled (but it should). This is just a data.frame wrapper for ggtern::tlr2xy.

get_xy_coord(X_SIR, xyz_col = c("S", "I", "R"))

Arguments

X_SIR

data.frame with columns in xyz_col

xyz_col

string vector (length 3) to match with x, y, and z. The example is c(S,I,R) or c("S", "I", "R"). Both styles work

Value

X_SIR motified to have columns "x" and "y" with the ternary coordinates