Skip to content

Commit

Permalink
fix missing log_if when pkg not loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
tmelliott committed Jul 22, 2024
1 parent cdc8aa3 commit 76dcec9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]", comment = c(ORCID = "0000-0002-7815-6318")),
person("Zhaoming", "Su", role = "aut"),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
3 changes: 1 addition & 2 deletions R/forecastplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -210,7 +209,7 @@ 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(iNZightTS::log_if(!!var, !!mult_fit)))
fit |>
fabletools::forecast(h = h) |>
dplyr::mutate(
Expand Down

0 comments on commit 76dcec9

Please sign in to comment.