| plot.exposure | R Documentation |
Produces a multi-panel plot of exposure analysis results. The default
layout shows cumulative exposure and cumulative events versus time
(top panel), the number of systems at risk over time (middle panel),
and the event rate over time (bottom panel). Alternatively, a single
which panel can be selected.
## S3 method for class 'exposure'
plot(
x,
which = c("all", "exposure", "at_risk", "event_rate"),
legend = TRUE,
legend_pos = "topleft",
...
)
x |
An object of class |
which |
Character string selecting which panel(s) to plot. One of
|
legend |
Logical; show the legend (default: TRUE). |
legend_pos |
Position of the legend (default: "topleft"). |
... |
Additional arguments passed to the underlying |
Invisibly returns NULL.
Other Repairable Systems Analysis:
exposure(),
mcf(),
nhpp(),
overlay_nhpp(),
plot.mcf(),
plot.nhpp(),
plot.nhpp_predict(),
predict_nhpp(),
print.exposure(),
print.mcf(),
print.nhpp(),
print.nhpp_predict()
id <- c(1, 1, 1, 2, 2, 2, 3, 3, 3, 3)
time <- c(100, 350, 500, 80, 300, 600, 150, 250, 400, 700)
result <- exposure(id, time)
plot(result)
plot(result, which = "exposure")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.