|
17 | 17 | #' autoplot(vars(Close, log(Close))) |
18 | 18 | #' |
19 | 19 | #' @importFrom ggplot2 ggplot aes geom_line guides guide_legend xlab |
20 | | -#' @export |
21 | 20 | autoplot.tbl_ts <- function(object, .vars = NULL, ...){ |
| 21 | + lifecycle::deprecate_soft( |
| 22 | + when = "0.6.0", |
| 23 | + what = "autoplot.tbl_ts()", |
| 24 | + with = "ggtime::autoplot.tbl_ts()", |
| 25 | + details = "Graphics functions have been moved to the {ggtime} package. Please use `library(ggtime)` instead." |
| 26 | + ) |
22 | 27 | quo_vars <- enquo(.vars) |
23 | 28 |
|
24 | 29 | kv <- key_vars(object) |
@@ -76,8 +81,13 @@ autoplot.tbl_ts <- function(object, .vars = NULL, ...){ |
76 | 81 |
|
77 | 82 | #' @rdname autoplot.tbl_ts |
78 | 83 | #' @importFrom ggplot2 ggplot aes geom_line guides guide_legend xlab |
79 | | -#' @export |
80 | 84 | autolayer.tbl_ts <- function(object, .vars = NULL, ...){ |
| 85 | + lifecycle::deprecate_soft( |
| 86 | + when = "0.6.0", |
| 87 | + what = "autolayer.tbl_ts()", |
| 88 | + with = "ggtime::autolayer.tbl_ts()", |
| 89 | + details = "Graphics functions have been moved to the {ggtime} package. Please use `library(ggtime)` instead." |
| 90 | + ) |
81 | 91 | quo_vars <- enquo(.vars) |
82 | 92 | kv <- key_vars(object) |
83 | 93 | nk <- n_keys(object) |
@@ -121,7 +131,6 @@ autolayer.tbl_ts <- function(object, .vars = NULL, ...){ |
121 | 131 | } |
122 | 132 |
|
123 | 133 | #' @importFrom ggplot2 fortify |
124 | | -#' @export |
125 | 134 | fortify.fbl_ts <- function(model, data = NULL, level = c(80, 95), ...){ |
126 | 135 | return(as_tibble(model)) |
127 | 136 | } |
@@ -152,8 +161,14 @@ fortify.fbl_ts <- function(model, data = NULL, level = c(80, 95), ...){ |
152 | 161 | #' autoplot(aus_production) |
153 | 162 | #' |
154 | 163 | #' @importFrom ggplot2 facet_wrap |
155 | | -#' @export |
156 | 164 | autoplot.fbl_ts <- function(object, data = NULL, level = c(80, 95), show_gap = TRUE, ...){ |
| 165 | + lifecycle::deprecate_soft( |
| 166 | + when = "0.6.0", |
| 167 | + what = "autoplot.fbl_ts()", |
| 168 | + with = "ggtime::autoplot.fbl_ts()", |
| 169 | + details = "Graphics functions have been moved to the {ggtime} package. Please use `library(ggtime)` instead." |
| 170 | + ) |
| 171 | + |
157 | 172 | fc_resp <- response_vars(object) |
158 | 173 | fc_key <- setdiff(key_vars(object), ".model") |
159 | 174 | common_models <- duplicated(key_data(object)[[".model"]] %||% rep(TRUE, NROW(key_data(object)))) |
@@ -219,10 +234,14 @@ autoplot.fbl_ts <- function(object, data = NULL, level = c(80, 95), show_gap = T |
219 | 234 | #' aus_production %>% |
220 | 235 | #' autoplot(Beer) + |
221 | 236 | #' autolayer(fc) |
222 | | -#' |
223 | | -#' @export |
224 | 237 | autolayer.fbl_ts <- function(object, data = NULL, level = c(80, 95), |
225 | 238 | point_forecast = list(mean = mean), show_gap = TRUE, ...){ |
| 239 | + lifecycle::deprecate_soft( |
| 240 | + when = "0.6.0", |
| 241 | + what = "autolayer.fbl_ts()", |
| 242 | + with = "ggtime::autolayer.fbl_ts()", |
| 243 | + details = "Graphics functions have been moved to the {ggtime} package. Please use `library(ggtime)` instead." |
| 244 | + ) |
226 | 245 | build_fbl_layer(object = object, data = data, level = level, |
227 | 246 | point_forecast = point_forecast, show_gap = show_gap, ...) |
228 | 247 |
|
@@ -470,9 +489,14 @@ build_fbl_layer <- function(object, data = NULL, level = c(80, 95), |
470 | 489 | #' autoplot() |
471 | 490 | #' |
472 | 491 | #' @importFrom ggplot2 ggplot geom_line geom_rect facet_grid vars ylab labs after_stat |
473 | | -#' @export |
474 | 492 | autoplot.dcmp_ts <- function(object, .vars = NULL, scale_bars = TRUE, |
475 | 493 | level = c(80, 95), ...){ |
| 494 | + lifecycle::deprecate_soft( |
| 495 | + when = "0.6.0", |
| 496 | + what = "autoplot.dcmp_ts()", |
| 497 | + with = "ggtime::autoplot.dcmp_ts()", |
| 498 | + details = "Graphics functions have been moved to the {ggtime} package. Please use `library(ggtime)` instead." |
| 499 | + ) |
476 | 500 | method <- object%@%"method" |
477 | 501 | idx <- index(object) |
478 | 502 | keys <- key(object) |
|
0 commit comments