Skip to content

Commit

Permalink
Fixed transformations of mstl objects
Browse files Browse the repository at this point in the history
Resolves #748
  • Loading branch information
mitchelloharawild committed Oct 14, 2018
1 parent 3372630 commit de40517
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/mstl.R
Expand Up @@ -48,7 +48,6 @@ mstl <- function(x, lambda=NULL, iterate=2, s.window=13, ...) {
}

# Replace missing values if necessary
origx <- x
if (anyNA(x)) {
x <- na.interp(x, lambda = lambda)
}
Expand Down Expand Up @@ -92,7 +91,7 @@ mstl <- function(x, lambda=NULL, iterate=2, s.window=13, ...) {
remainder <- deseas - trend

# Package into matrix
output <- cbind(origx, trend)
output <- cbind(x, trend)
if (!is.null(msts)) {
for (i in seq_along(msts))
output <- cbind(output, seas[[i]])
Expand Down

1 comment on commit de40517

@davidreilly007
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Mitchell, looks good!

Please sign in to comment.