Skip to content

Commit

Permalink
Add progress reporting to model() docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchelloharawild committed Jan 17, 2021
1 parent 5551f01 commit 0bd09ca
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
7 changes: 7 additions & 0 deletions R/model.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ model <- function(.data, ...){
#' [`future::plan()`] before estimating the models, they will be computed
#' according to that plan.
#'
#' @section Progress:
#'
#' Progress on model estimation can be obtained by wrapping the code with
#' `progressr::with_progress()`. Further customisation on how progress is
#' reported can be controlled using the `progressr` package.
#'
#' @examples
#' if (requireNamespace("fable", quietly = TRUE) && requireNamespace("tsibbledata", quietly = TRUE)) {
Expand All @@ -42,6 +47,7 @@ model <- function(.data, ...){
#' # Training a seasonal naive and ETS(A,A,A) model to the monthly
#' # "Food retailing" turnover for selected Australian states.
#' library(dplyr)
#' progressr::with_progress(
#' aus_retail %>%
#' filter(
#' Industry == "Food retailing",
Expand All @@ -51,6 +57,7 @@ model <- function(.data, ...){
#' snaive = SNAIVE(Turnover),
#' ets = ETS(log(Turnover) ~ error("A") + trend("A") + season("A")),
#' )
#' )
#' }
#'
#' @export
Expand Down
10 changes: 10 additions & 0 deletions man/model.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0bd09ca

Please sign in to comment.