ndtv AnimationsnetworkDynamic object with color
name output from an existing status variable with numeric
format.colorTEA(nw, old.var = "status", old.sus = 0, old.inf = 1, old.rec = 2,
new.var = "ndtvcol", new.sus, new.inf, new.rec, verbose = TRUE)networkDynamic.ndtv package allows for animated plots of
dynamic network objects, showing the evolving partnership
structure. The EpiModel package uses
temporally-extended attributes (TEAs) to store longitudinal
disease status for every vertex in a dynamic network. To
visualize disease status dynamically in ndtv, it is
currently necessary to create a TEA containing the colors
to be used in drawing the nodes.The convention in plot.epiNet.simTrans is to
color the susceptible nodes as blue, infected nodes as red,
and recovered nodes as green. This function allows the user
to take the existing status TEA on the
networkDynamic object and transform that numeric
variable into any colors.
epiNet.simTrans and the ndtv package
documentation.## See EpiModel Tutorial vignette ##Run the code above in your browser using DataLab