From 4b185bf001b94017d5048961469392281ea35c78 Mon Sep 17 00:00:00 2001 From: Ben Letham Date: Fri, 1 Sep 2017 16:12:19 -0700 Subject: [PATCH] Fix duplicated function from merge --- R/R/prophet.R | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/R/R/prophet.R b/R/R/prophet.R index 272b499..667a52c 100644 --- a/R/R/prophet.R +++ b/R/R/prophet.R @@ -752,40 +752,6 @@ parse_seasonality_args <- function(m, name, arg, auto.disable, default.order) { return(fourier.order) } -#' Get number of Fourier components for built-in seasonalities. -#' -#' @param m Prophet object. -#' @param name String name of the seasonality component. -#' @param arg 'auto', TRUE, FALSE, or number of Fourier components as -#' provided. -#' @param auto.disable Bool if seasonality should be disabled when 'auto'. -#' @param default.order Int default Fourier order. -#' -#' @return Number of Fourier components, or 0 for disabled. -#' -#' @keywords internal -parse_seasonality_args <- function(m, name, arg, auto.disable, default.order) { - if (arg == 'auto') { - fourier.order <- 0 - if (name %in% names(m$seasonalities)) { - warning('Found custom seasonality named "', name, - '", disabling built-in ', name, ' seasonality.') - } else if (auto.disable) { - warning('Disabling ', name, ' seasonality. Run prophet with ', name, - '.seasonality=TRUE to override this.') - } else { - fourier.order <- default.order - } - } else if (arg == TRUE) { - fourier.order <- default.order - } else if (arg == FALSE) { - fourier.order <- 0 - } else { - fourier.order <- arg - } - return(fourier.order) -} - #' Set seasonalities that were left on auto. #' #' Turns on yearly seasonality if there is >=2 years of history.