test_that("Can summarise forecasts", {
skip_on_cran()
expect_true(
any(
class(
summary(
posterior2,
type = "all"
)
) %in% "fv_posterior"
)
)
expect_true(
any(
class(
summary(
posterior2,
type = "all"
)
) %in% "fv_posterior"
)
)
expect_true(
all(
grepl(
"r",
summary(
posterior2,
type = "rt"
)$variable
)
)
)
expect_true(
all(
summary(posterior2, forecast = TRUE, type = "rt")$date
>= as.Date("2021-03-20")
)
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.