plot.aedseo_tsd {aedseo} | R Documentation |
Create a complete 'ggplot' appropriate to a particular data type
Description
This function generates a complete 'ggplot' object suitable for
visualizing time series data in an aedseo_tsd
object. It creates a line
plot connecting the observations and adds points at each data point.
Usage
## S3 method for class 'aedseo_tsd'
plot(x, ...)
## S3 method for class 'aedseo'
plot(x, ...)
Arguments
x |
An |
... |
Additional arguments passed to specific methods. |
Value
A 'ggplot' object for visualizing the time series data.
See Also
Examples
# Create an example aedseo_tsd object
aedseo_tsd_object <- tsd(
observed = c(100, 120, 150, 180, 220, 270),
time = as.Date(c(
"2023-01-01",
"2023-01-02",
"2023-01-03",
"2023-01-04",
"2023-01-05",
"2023-01-06"
)),
time_interval = "day"
)
# Create a ggplot visualization for the aedseo_tsd object
plot(aedseo_tsd_object)
# Create an aedseo object
aedseo_object <- aedseo(
tsd = aedseo_tsd_object,
k = 3,
level = 0.95,
family = "quasipoisson"
)
# Create a ggplot visualization of growth rates with confidence intervals
plot(aedseo_object, linewidth = 1, alpha = 0.2)
[Package aedseo version 0.1.2 Index]