View source: R/sts_observation.R
sts_observation | R Documentation |
sts
object with a given observation dateFunction for creating an sts
object with a given observation date.
sts_observation(sts, dateObservation, cut = TRUE)
sts |
sts-object we want to set at a previous state. Needs to include a reporting triangle. |
dateObservation |
Date for which we want the state. Needs to be in the reporting triangle dates. |
cut |
Boolean indicating whether to have 0 counts after the observation date or to simply cut the sts-object |
data("salmAllOnset")
salmAllOnsety2014m01d20 <- sts_observation(salmAllOnset,
dateObservation="2014-01-20",cut=FALSE)
plot(salmAllOnset)
lines(observed(salmAllOnsety2014m01d20),type="h",col="red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.