Skip to content

Commit

Permalink
Have fourier() use consistent arguments as fable
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchelloharawild committed Feb 4, 2020
1 parent 63f53d7 commit 16d79e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ License: GPL-3
Encoding: UTF-8
LazyData: true
ByteCompile: true
RoxygenNote: 6.1.1
RoxygenNote: 7.0.2.9000
Roxygen: list(markdown = TRUE, roclets=c('rd', 'collate', 'namespace'))
Language: en-GB
VignetteBuilder: knitr
8 changes: 4 additions & 4 deletions R/model.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ train_fasster <- function(.data, formula, specials, include = NULL){
colnames(out$FF) <- rep(deparse(cl), NCOL(out$FF))
out
},
fourier = function(period, ...){
fourier = function(period, K, ...){
period <- get_frequencies(period, self$data, .auto = "smallest")
cl <- sys.call()
out <- dlmModTrig(period, ...)
out <- dlmModTrig(period, q = K, ...)
colnames(out$FF) <- rep(deparse(cl), NCOL(out$FF))
out
},
Expand Down Expand Up @@ -176,8 +176,8 @@ train_fasster <- function(.data, formula, specials, include = NULL){
#'
#' Special DLM components can be specified using special functions defined below:
#' \itemize{
#' \item seas(s): Creates seasonal factors with seasonality s
#' \item trig(s): Creates seasonal fourier terms with seasonality s
#' \item seas(s): Creates seasonal factors with seasonal period s
#' \item fourier(s, K): Creates seasonal fourier terms with seasonal period s and K harmonics
#' \item poly(n): Creates a polynomial of order n (poly(1) creates a level, poly(2) creates a trend)
#' \item ARMA(ar, ma): Creates ARMA terms with coefficient vectors ar and ma
#' \item custom(dlm): Creates a custom dlm structure, using \code{\link[dlm]{dlm}}
Expand Down
4 changes: 2 additions & 2 deletions man/fasster-model.Rd

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

0 comments on commit 16d79e8

Please sign in to comment.