| 1 |
skip_on_cran() |
| 2 |
|
| 3 |
skip_if_not_installed("modeltests") |
| 4 |
library(modeltests) |
| 5 |
|
| 6 |
test_that("augment.decomposed.ts", { |
| 7 |
check_arguments(augment.decomposed.ts, strict = FALSE) |
| 8 |
|
| 9 |
d1a <- stats::decompose(nottem, type = "additive") |
| 10 |
d1b <- stats::decompose(nottem, type = "multiplicative") |
| 11 |
d2 <- stats::stl(nottem, s.window = "periodic", robust = TRUE) |
| 12 |
|
| 13 |
a1a <- augment(d1a) |
| 14 |
a1b <- augment(d1b) |
| 15 |
a2 <- augment(d2) |
| 16 |
|
| 17 |
check_tibble(a1a, method = "augment") |
| 18 |
check_tibble(a1b, method = "augment") |
| 19 |
check_tibble(a2, method = "augment") |
| 20 |
|
| 21 |
check_dims(a1a, 240, 4) |
| 22 |
check_dims(a1b, 240, 4) |
| 23 |
check_dims(a2, 240, 5) |
| 24 |
}) |