diff --git a/DESCRIPTION b/DESCRIPTION index a963704..3216ae7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: iNZightTS Type: Package Title: Time Series for 'iNZight' -Version: 2.0.0 +Version: 2.0.1 Authors@R: c( person("Tom", "Elliott", role = c("aut", "cre"), email = "tom.elliott@auckland.ac.nz", comment = c(ORCID = "0000-0002-7815-6318")), person("Zhaoming", "Su", role = "aut"), diff --git a/NEWS.md b/NEWS.md index 89a4c9b..e6e4bdf 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# iNZightTS 2.0.1 + +- prefix `log_if` with `iNZightTS::` so 'fabletools' can find it if the package is not loaded with `library()` + # iNZightTS 2.0.0 Large update with major refactoring of most/all plots and processes. Notably, diff --git a/R/forecastplot.R b/R/forecastplot.R index de12f4c..e3f9992 100644 --- a/R/forecastplot.R +++ b/R/forecastplot.R @@ -20,7 +20,6 @@ #' #' @export #' @md - log_if <- fabletools::new_transformation( transformation = function(x, mult_fit) { if (mult_fit) log(x) else as.numeric(x) @@ -210,7 +209,9 @@ use_urca <- function() { predict_inzightts_var <- function(x, var, h, mult_fit, pred_model, confint_width) { - fit <- fabletools::model(x, Prediction = pred_model(log_if(!!var, !!mult_fit))) + fit <- fabletools::model(x, + Prediction = pred_model(log_if(!!var, !!mult_fit)) + ) fit |> fabletools::forecast(h = h) |> dplyr::mutate(