Skip to content

Commit

Permalink
Merge pull request robjhyndman#322 from mitchelloharawild/master
Browse files Browse the repository at this point in the history
Removed the need for forecast:::datamat
  • Loading branch information
robjhyndman committed May 13, 2016
2 parents 81902a0 + 5bd5ca4 commit a4c29cb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions R/lm.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ tslm <- function(formula, data, subset, lambda=NULL, biasadj=FALSE, ...){
}

# Grab any variables missing from data
vars[[1]] <- quote(forecast:::datamat)
if(!missing(data)){
data <- datamat(eval.parent(vars), data)
data <- datamat(do.call(datamat, as.list(vars[-1]), envir = parent.frame()),data)
}
else{
data <- eval.parent(vars)
data <- do.call(datamat, as.list(vars[-1]), envir = parent.frame())
}

# Check to see if data is univariate time series
Expand Down

0 comments on commit a4c29cb

Please sign in to comment.