plot.trim.totals | R Documentation |
This function plots a time series of one or more trim.totals
objects, i.e. the output of totals
.
Both the time totals themselves, as the associated standard errros will be plotted,
the former as a solid line with markers, the latter as a transparent band.
## S3 method for class 'trim.totals'
plot(
x,
...,
names = NULL,
xlab = "auto",
ylab = "Time totals",
leg.pos = "topleft",
band = "se"
)
x |
an object of class |
... |
optional additional |
names |
optional character vector with names for the various series. |
xlab |
x-axis label. The default value of "auto" will be changed into "Year" or "Time Point", whichever is more appropriate. |
ylab |
y-axis label. |
leg.pos |
legend position, similar as in |
band |
Defines if the uncertainty band will be plotted using standard errors ("se") or confidence intervals ("ci"). |
Additionally, the observed counts will be plotted (as a line) when this was asked for in the call to totals
.
Multiple time-total data sets can be compared in a single plot
Other graphical post-processing:
heatmap()
,
plot.trim.index()
# Simple example
data(skylark2)
z <- trim(count ~ site + year, data=skylark2, model=3)
plot(totals(z))
# Extended example
z1 <- trim(count ~ site + year + habitat, data=skylark2, model=3)
z2 <- trim(count ~ site + year, data=skylark2, model=3)
t1 <- totals(z1, obs=TRUE)
t2 <- totals(z2, obs=TRUE)
plot(t1, t2, names=c("with covariates", "without covariates"), main="Skylark", leg.pos="bottom")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.