Skip to content

Commit

Permalink
A fix for an issue related to #35. Still not clear, why this happens.…
Browse files Browse the repository at this point in the history
… If is.zoo(y) and data.table is loaded, the extraction of y leads to a weird class and sort of distruction of the object.
  • Loading branch information
Ivan Svetunkov committed Mar 3, 2021
1 parent 3549991 commit 42bb6d2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: greybox
Type: Package
Title: Toolbox for Model Building and Forecasting
Version: 0.6.8.41001
Date: 2021-02-24
Version: 0.6.8.41002
Date: 2021-03-03
Authors@R: c(person("Ivan", "Svetunkov", email = "[email protected]", role = c("aut", "cre"),
comment="Lecturer at Centre for Marketing Analytics and Forecasting, Lancaster University, UK"),
person("Yves R.", "Sagaert", role = c("ctb"),
Expand Down
5 changes: 4 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
greybox v0.6.8 (Release data: 2021-02-14)
greybox v0.6.8 (Release data: 2021-03-03)
==============

Changes:
* MAE, MSE etc now have parameter "holdout" instead of "actual". This is needed for consistency purposes with measures() function.

Bugfixes:
* A fix for an exotic case of zoo + data.table, resulting in destruction of response variable.


greybox v0.6.7 (Release data: 2021-02-14)
==============
Expand Down
3 changes: 2 additions & 1 deletion R/alm.R
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,8 @@ alm <- function(formula, data, subset, na.action,

dataWork <- eval(mf, parent.frame());
dataTerms <- terms(dataWork);
y <- dataWork[,1];
# Make this numeric, to address potential issues with zoo + data.table
y <- as.numeric(dataWork[,1]);

interceptIsNeeded <- attr(terms(dataWork),"intercept")!=0;
# Create a model from the provided stuff. This way we can work with factors
Expand Down

0 comments on commit 42bb6d2

Please sign in to comment.