Description Usage Arguments Examples
This function will create a timeline using the
ggplot2
framework in a style similar to
Preceden. There are two
types of events, those that have a range (i.e. a start
and end date) and and points-in-time. The latter can be
grouped in separate rows to prevent overlapping or to
organize different types of events. Grouping of
point-in-time events will color code those events
accordingly.
1 2 3 4 5 6 7 8 | timeline(df, events, label.col = names(df)[1],
group.col = names(df)[2], start.col = names(df)[3],
end.col = names(df)[4], text.size = 4,
text.color = "black", num.label.steps = 5,
event.label.col, event.col, event.group.col,
event.spots = 1, event.label = "",
event.label.method = 1, event.line = FALSE,
event.text.size = 4, event.above = TRUE, limits, ...)
|
df |
data for time periods. |
events |
data for events (optional). |
label.col |
the column name in |
group.col |
the column name in |
start.col |
the column name in |
end.col |
the column name in |
text.size |
the text size for labels in |
text.color |
the text color for labels in
|
num.label.steps |
the number of steps to use for labeling events. |
event.label.col |
the column name in |
event.col |
the column name in |
event.group.col |
the column name in |
event.spots |
the number of rows to use for events.
Note that each group in |
event.label |
the label to use on the x-axis for events. |
event.label.method |
the labeling method. For
|
event.line |
whether to draw a vertical line for each event. |
event.text.size |
the text size for event labels. |
event.above |
whether events should be plotted above
( |
limits |
the limits of the y-axis. |
... |
currently unused. |
1 2 3 | data(ww2)
timeline(ww2, ww2.events)
timeline(ww2, ww2.events, event.spots=2, event.label='', event.above=FALSE)
|
Loading required package: ggplot2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.