Standardize data to plot on a timeline plot
Standardize data to plot on a timeline plot
vistime_data( data, col.event = "event", col.start = "start", col.end = "end", col.group = "group", col.color = "color", col.fontcolor = "fontcolor", col.tooltip = "tooltip", optimize_y = TRUE, ... )
data |
|
col.event |
(optional, character) the column name in |
col.start |
(optional, character) the column name in |
col.end |
(optional, character) the column name in |
col.group |
(optional, character) the column name in |
col.color |
(optional, character) the column name in |
col.fontcolor |
(optional, character) the column name in |
col.tooltip |
(optional, character) the column name in |
optimize_y |
(optional, logical) distribute events on y-axis by smart heuristic (default), otherwise use order of input data. |
... |
for deprecated arguments up to vistime 1.1.0 (like events, colors, ...) |
vistime_data
returns a data.frame with the following columns: event, start, end, group, tooltip, label, col, fontcol, subplot, y
# presidents and vice presidents pres <- data.frame( Position = rep(c("President", "Vice"), each = 3), Name = c("Washington", rep(c("Adams", "Jefferson"), 2), "Burr"), start = c("1789-03-29", "1797-02-03", "1801-02-03"), end = c("1797-02-03", "1801-02-03", "1809-02-03"), color = c("#cbb69d", "#603913", "#c69c6e"), fontcolor = c("black", "white", "black") ) vistime_data(pres, col.event = "Position", col.group = "Name")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.