Description Usage Arguments Author(s) Examples
View source: R/plotIncidence.R
This function provides advanced plotting facilities for incidence time series using ggplot2
1 2 3 4 |
x |
a data.frame containing the data to be plotted. |
dates |
a character string or an integer indicating which column contains the dates to use |
bin |
an integer indicating the size of the time window (in days) to use for the incidence computation |
fill.by |
a character string or an integer indicating which column to use to color the bars |
split.by |
a character string or an integer indicating which column to use to split the charts |
shade.by |
a character string or an integer indicating which column to use to shade the bars |
start.at |
a starting date for the incidence; defaults to the earliest date of the dataset |
stop.at |
a stoping date for the incidence; defaults to the latest date of the dataset |
xlab |
a label for the x axis |
ylab |
a label for the y axis |
date.format |
a character string indicating the format of the dates |
angle |
an integer indicating the angle of the dates |
xbreaks |
a character string indicating the time interval between vertical lines |
col.pal |
an integer between 1 and 8 indicating a color palette to be used; if NULL, the default color palette of ggplot2 is used |
Thibaut Jombart thibautjombart@gmail.com
1 2 3 4 5 6 7 8 9 | data("toy")
head(toy)
## basic plot
plotIncidence(toy, dates="dateOfOnset")
## change column indication, and bin size to 2 days
plotIncidence(toy, dates=1, bin=2)
plotIncidence(toy, dates=1, bin=2, split.by="gender", fill.by=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.