if (require(outbreaks)) {
## example using MERS outbreak in Korea, 2014
head(mers_korea_2015[[1]])
head(mers_korea_2015[[2]])
x <- make_epicontacts(linelist=mers_korea_2015[[1]],
contacts = mers_korea_2015[[2]],
directed=TRUE)
if (FALSE) {
plot(x)
plot(x, node_color = "place_infect")
# show transmission tree with time as the horizontal axis, showing all nodes
vis_epicontacts(x, x_axis = "dt_onset", thin = FALSE)
plot(x, node_color = "loc_hosp", legend_max=20, annot=TRUE)
plot(x, node_color = "loc_hosp", legend_max=20, annot=TRUE, x_axis = "dt_onset")
plot(x, "place_infect", node_shape = "sex",
shapes = c(M = "male", F = "female"))
plot(x, "sex", node_shape = "sex", shapes = c(F = "female", M = "male"),
edge_label = "exposure", edge_color = "exposure")
}
}
Run the code above in your browser using DataLab