timeLine: timeLine

Description Usage Arguments Examples

View source: R/timeLine.R

Description

Draw a host time line. Time use timestamp or Date in ISO format.

Usage

1
2
3
4
5
6
7
8
timeLine(
  data,
  title,
  color = NULL,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

data

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

title

a tttle as character

color

list of color for timeline elements

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
10
11
12
13
library(SMITIDvisu)
data(hostline)
tl <- timeLine(hostline,
               title="Example host 113",
               color=list("infected"="red","offspring"="green",
                             "alive"="blue","inf"="orange",
                             "dead"="black","Obs"="purple"))
## Not run: 
## export as standalone html file
htmlwidgets::saveWidget(tl, "timeline.html")
browseURL("timeline.html")

## End(Not run)

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