Skip to content

Commit 5835efd

Browse files
Sped up model() example
1 parent 93731e1 commit 5835efd

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

R/model.R

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ model <- function(.data, ...){
3030
#'
3131
#'
3232
#' @examples
33-
#' if (requireNamespace("fable", quietly = TRUE)) {
33+
#' if (requireNamespace("fable", quietly = TRUE) && requireNamespace("tsibbledata", quietly = TRUE)) {
3434
#' library(fable)
3535
#' library(tsibbledata)
3636
#'
@@ -39,10 +39,13 @@ model <- function(.data, ...){
3939
#' model(ets = ETS(log(Beer) ~ error("M") + trend("Ad") + season("A")))
4040
#'
4141
#' # Training a seasonal naive and ETS(A,A,A) model to the monthly
42-
#' # "Food retailing" turnover for each Australian state/territory.
42+
#' # "Food retailing" turnover for selected Australian states.
4343
#' library(dplyr)
4444
#' aus_retail %>%
45-
#' filter(Industry == "Food retailing") %>%
45+
#' filter(
46+
#' Industry == "Food retailing",
47+
#' State %in% c("Victoria", "New South Wales", "Queensland")
48+
#' ) %>%
4649
#' model(
4750
#' snaive = SNAIVE(Turnover),
4851
#' ets = ETS(log(Turnover) ~ error("A") + trend("A") + season("A")),

man/model.Rd

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)