transmissionTree: transmissionTree

Description Usage Arguments Examples

View source: R/transmissionTree.R

Description

Draw a transmission tree over the time. Time use timestamp or Date in ISO format ("

Usage

1
2
3
4
5
6
7
8
transmissionTree(
  nodes,
  edges,
  nodes.color = NULL,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

nodes

a data.frame that reprensent hosts status in time with ID, status and time in columns

edges

a data.frame that reprensent tramsmission link between hosts (pathogens) with ID, source, target and time in columns

nodes.color

a list of color for nodes status "status"="color"

width

numeric width for the area in pixels.

height

numeric hieght for the area in pixels.

elementId

the element ID where is draw

Examples

1
2
3
4
5
6
7
8
9
library(SMITIDvisu)
data(transmissiontree)
tt <- transmissionTree(tt.nodes,tt.edges, nodes.color = list("default"="black","Inf"="red"))
## Not run: 
## export as standalone html file
htmlwidgets::saveWidget(tt, "transTree.html")
browseURL("transTree.html")

## End(Not run)

SMITIDvisu documentation built on Feb. 8, 2021, 9:06 a.m.